[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: add option to generate dependency graph

From: Luke Shumaker
Subject: Re: add option to generate dependency graph
Date: Thu, 19 Aug 2010 23:45:34 -0400

Thank you for showing me graphviz, it's pretty neat!

The attached patch adds the ``-g, --graph'' options to make; it will
spit out a graphviz file to stdout. (The patch is against the 3.82

Note that this will NOT include recursive use of make, I was working on
that, but couldn't get it working.

I've been manually adding the line
into the graphs, and rendering them with dot.

~ LukeShu

On Thu, 2010-08-19 at 19:57 +0800, Lynn Lin wrote:
> We can generate some data format which describe dependency,then we can
> use graphviz to get dependency graph
> On 8/19/10, Luke Shumaker <address@hidden> wrote:
> >> Hi,
> >>     is that possible that we can add an option to "make" that we can
> >> generatge dependency graph? This will help us to debug issues (I know
> >> we already have --debug  and --print-data-base option)
> >>
> >>
> >> Thanks
> >> Lynn
> >
> > Since the dependency graph is more complex than just a tree (lines must
> > cross) this is difficult to do with ASCII output; if you were to patch
> > make to print out dependencies of files as it processes them, you would
> > end up with many ``This part of the tree has already been printed''
> > messages.
> >
> > Running the command:
> >   make YOUR_ARGS -pqs|sed -n 's/.$/& /;/\# Not a
> > target:/N;/^[^\t#=%][^#=%]*:[^=]/p'
> >
> > should give you a good simple list of targets and their dependencies.
> > Given the proper graphing software, it should be trivial to generate a
> > graph from this data.
> >
> > ~ LukeShu
> >
> >

Attachment: gnumake-graphviz.patch
Description: Text Data

reply via email to

[Prev in Thread] Current Thread [Next in Thread]