help-make
[Top][All Lists]
Advanced

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

add option to generate dependency graph


From: Luke Shumaker
Subject: add option to generate dependency graph
Date: Wed, 18 Aug 2010 23:20:38 -0400

> 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




reply via email to

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