On Mon, 2008-02-11 at 22:44 +0200, Eli Zaretskii wrote: > > From: "Dave Korn" <[EMAIL PROTECTED]> > > - when to dump the data ? (I'm thinking maybe sometime just after all the > > makefiles have been remade?) > > I think it's before the second call to update_goal_chain in main.c.
Alternatively you could have it dumped as part of the -p output, maybe. > > - what's the name of the struct that holds the dependency data and where's > > the > > head? > > I think the variable `goals' (static struct dep variable in main.c) is > it, possibly together with struct file members of each goal. Each > struct file's `deps' member points to a chain of struct dep objects, > chained through their `next' member. I think you can generate the > dependency graph by chasing these. See remake.c, dep.h, and filedef.h > for more details (and perhaps wait for Paul to correct what I messed > up ;-). That's about right. The thing to remember is that GNU make's dependency graph is not a single-rooted tree. It's a set of directed acyclic graphs. There isn't really any one starting point inherent in the graph. GNU make starts either (a) where the user asks via command line goals, or (b) the first target it finds in the makefiles. The question is, do you want to construct a graph of the entire set of targets that are defined in the makefile? Because it's quite common for there to be a number of completely disjoint graphs. Or do you want to construct a graph for the targets that will actually be checked during a given invocation of make? -- ------------------------------------------------------------------------------- Paul D. Smith <[EMAIL PROTECTED]> Find some GNU make tips at: http://www.gnu.org http://make.mad-scientist.us "Please remain calm...I may be mad, but I am a professional." --Mad Scientist _______________________________________________ Help-make mailing list [email protected] http://lists.gnu.org/mailman/listinfo/help-make
