grub2: bring back build of aros-side grub2 tools
[AROS.git] / tools / MetaMake / dirnode.h
blob13e92a784f378146d21a604c88427f9307d5ea0a
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"
28 #include "project.h"
30 struct DirNode
32 struct Node node;
34 struct DirNode * parent;
35 time_t time;
36 struct List subdirs;
37 struct List makefiles;
40 struct MakefileTarget
42 struct Node node;
44 int virtualtarget;
45 struct List deps;
48 struct Makefile
50 struct Node node;
52 struct DirNode * dir; /* The directory where this makefile is located */
53 time_t time; /* Last time this Makefile was scanned for targets */
54 struct List targets; /* list of MakefileTargets: targets present in this makefile */
55 int generated;
58 void printdirnode (struct DirNode * node, int level);
59 void printdirnodemftarget (struct DirNode * node);
60 void freedirnode (struct DirNode * node);
61 void freemakefile (struct Makefile * makefile);
62 struct DirNode * finddirnode (struct DirNode * node, const char * path);
63 int scandirnode (struct DirNode * node, const char * mfname, struct List * ignoredirs);
64 int scanmakefiles (struct Project * prj, struct DirNode * node, struct List * vars);
65 struct Makefile * addmakefile (struct DirNode * node, const char * filename);
66 struct Makefile * findmakefile (struct DirNode * node, const char * filename);
67 const char * buildpath (struct DirNode * node);
68 struct DirNode * readcachedir (FILE * fh);
69 int writecachedir (FILE * fh, struct DirNode * node);
70 void freemakefiletargetlist (struct List * targets);
72 #endif /* __MMAKE_DIRNODE_H */