2 * Copyright (c) 1988, 1989, 1990, 1993
3 * The Regents of the University of California. All rights reserved.
4 * Copyright (c) 1989 by Berkeley Softworks
7 * This code is derived from software contributed to Berkeley by
10 * Redistribution and use in source and binary forms, with or without
11 * modification, are permitted provided that the following conditions
13 * 1. Redistributions of source code must retain the above copyright
14 * notice, this list of conditions and the following disclaimer.
15 * 2. Redistributions in binary form must reproduce the above copyright
16 * notice, this list of conditions and the following disclaimer in the
17 * documentation and/or other materials provided with the distribution.
18 * 3. All advertising materials mentioning features or use of this software
19 * must display the following acknowledgement:
20 * This product includes software developed by the University of
21 * California, Berkeley and its contributors.
22 * 4. Neither the name of the University nor the names of its contributors
23 * may be used to endorse or promote products derived from this software
24 * without specific prior written permission.
26 * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
27 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
28 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
29 * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
30 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
31 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
32 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
33 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
34 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
35 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
38 * $DragonFly: src/usr.bin/make/GNode.h,v 1.3 2005/03/12 11:25:16 okumoto Exp $
41 #ifndef GNode_h_39503bf2
42 #define GNode_h_39503bf2
50 * The structure for an individual graph node. Each node has several
51 * pieces of data associated with it.
53 typedef struct GNode {
54 char *name; /* The target's name */
55 char *path; /* The full pathname of the target file */
58 * The type of operator used to define the sources (qv. parse.c)
59 * See OP_ flags in make.h
63 int order; /* Its wait weight */
65 Boolean make; /* TRUE if this target needs to be remade */
67 /* Set to reflect the state of processing on this node */
69 UNMADE, /* Not examined yet */
72 * Target is already being made. Indicates a cycle in the graph.
77 MADE, /* Was out-of-date and has been made */
78 UPTODATE, /* Was already up-to-date */
81 * An error occured while it was being
82 * made (used only in compat mode)
87 * The target was aborted due to an
88 * error making an inferior (compat).
93 * Marked as potentially being part of a graph cycle. If we
94 * come back to a node marked this way, it is printed and
95 * 'made' is changed to ENDCYCLE.
100 * The cycle has been completely printed. Go back and
101 * unmark all its members.
106 /* TRUE if one of this target's children was made */
109 int unmade; /* The number of unmade children */
110 int mtime; /* Its modification time */
111 int cmtime; /* Modification time of its youngest child */
114 * Links to parents for which this is an implied source, if any. (nodes
115 * that depend on this, as gleaned from the transformation rules.
119 /* List of nodes of the same name created by the :: operator */
122 /* Lst of nodes for which this is a source (that depend on this one) */
125 /* List of nodes on which this depends */
129 * List of nodes that must be made (if they're made) after this node is,
130 * but that do not depend on this node, in the normal sense.
135 * List of nodes that must be made (if they're made) before this node
136 * can be, but that do no enter into the datedness of this node.
141 * List of ``local'' variables that are specific to this target
142 * and this target only (qv. var.c [$@ $< $?, etc.])
147 * List of strings that are commands to be given to a shell
148 * to create this target.
152 /* current command executing in compat mode */
153 LstNode *compat_command;
156 * Suffix for the node (determined by Suff_FindDeps and opaque to
157 * everyone but the Suff module)
162 #endif /* GNode_h_39503bf2 */