added concrete implementations of putc(), getc(), getchar() and gets()
[tangerine.git] / tools / MetaMake / dirnode.h
blobe04079ec50d250d5403b5d19a171cac6fa2eadef
1 #ifndef __MMAKE_DIRNODE_H
2 #define __MMAKE_DIRNODE_H
4 /* MetaMake - A Make extension
5 Copyright © 1995-2004, The AROS Development Team. All rights reserved.
7 This file is part of MetaMake.
9 MetaMake is free software; you can redistribute it and/or modify
10 it under the terms of the GNU General Public License as published by
11 the Free Software Foundation; either version 2, or (at your option)
12 any later version.
14 MetaMake is distributed in the hope that it will be useful,
15 but WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 GNU General Public License for more details.
19 You should have received a copy of the GNU General Public License
20 along with GNU CC; see the file COPYING. If not, write to
21 the Free Software Foundation, 59 Temple Place - Suite 330,
22 Boston, MA 02111-1307, USA. */
24 #include <time.h>
25 #include <stdio.h>
27 #include "list.h"
29 typedef struct _DirNode DirNode;
31 struct _DirNode
33 Node node;
35 DirNode * parent;
36 time_t time;
37 List subdirs;
38 List makefiles;
41 typedef struct
43 Node node;
45 int virtualtarget;
46 List deps;
48 MakefileTarget;
50 typedef struct
52 Node node;
54 DirNode * dir; /* The directory where this makefile is located */
55 time_t time; /* Last time this Makefile was scanned for targets */
56 List targets; /* list of MakefileTargets: targets present in this makefile */
58 Makefile;
60 void printdirnode (DirNode * node, int level);
61 void printdirnodemftarget (DirNode * node);
62 void freedirnode (DirNode * node);
63 void freemakefile (Makefile * makefile);
64 DirNode * finddirnode (DirNode * node, const char * path);
65 int scandirnode (DirNode * node, const char * mfname, List * ignoredirs);
66 int scanmakefiles (DirNode * node, List * vars);
67 Makefile * addmakefile (DirNode * node, const char * filename);
68 Makefile * findmakefile (DirNode * node, const char * filename);
69 const char * buildpath (DirNode * node);
70 DirNode * readcachedir (FILE * fh);
71 int writecachedir (FILE * fh, DirNode * node);
73 #endif /* __MMAKE_DIRNODE_H */