in reply to The dreadful Makefiles
For some background on what you are trying to do, you might be interested in this article on Black: a make replacement.
One big problem here is the ability of make to execute arbitrary, even dynamically built, commands to build a target.
You might want to have a look at the "-np" switch of make, which prints out the internal database of make, with all rules, targets, etc. (a lot of output). In my make's output (GNU make that is), the output is preceded by a standard comment indicating the source of the rule/assignment, like "# makefile", "# environment". By recursive grepping over this output, you might achieve some of your goals. For visualization of your results, I heartily recommend GraphViz.
Christian Lemburg
Brainbench MVP for Perl
http://www.brainbench.com
|
|---|