Hello Reinier,
Thanks for the pointers regarding the MAKAO utiliity as well as your local solution to handle the make -p output. Appears that MAKAO is a full-fledged attempt at generating the DAGs for a makefile. But for running your perl code we need the graphviz utility also to be able to generate DAGs. Regards, Rakesh > Date: Mon, 14 Apr 2014 12:14:42 +0200 > From: [email protected] > To: [email protected] > Subject: Re: Diagramming a makefile? > > On Sun Apr 13 22:44:58 2014, [email protected] (Rakesh Sharma) wrote: > > Hello GNU makers, > > > > Is there any tool/utility which can diagram the DAG of the > > rules/targets by going thru the makefile? And I don't mean this in > > a generic way, that all sorts of complex $(eval-ed) rules need to > > be diagrammed. > > MAKAO: > > http://mcis.polymtl.ca/~bram/makao/ > > I haven't used it in a while, but there is a recent release. > > I have a simple Perl script that takes make -p output > and outputs it in a CSV format that I can filter or convert > to Graphviz format with other scripts. > > http://www.win.tue.nl/~rp/bin/make2csv > > It doesn't do a perfect job, and other Perl scripts exist with > the same purpose. However, all of these attempts appear incomplete. > No doubt there are efforts in other languages, too. > > It would be helpful to have an official, exact description > of makefile syntax, telling exactly how to parse make -p's output, > where to find the targets, dependencies, and recipes, > and what differences exist between versions. > The source code is the ultimate specification, of course, > and the info files more or less contain the information, > but it would be nice to have it isolated in a single place. > > > What I feel is that if we have a picture of the DAG of a makefile, > > then we can better understand the behavior of make. And vice versa > > too, we can start off writing a makefile by drawing the DAG first & > > then convert that into a makefile (the rules portion). > > > > Considering that make is nearing 4 decades, it's hard to believe > > that such utilities are not already available. > > Some are, but it's hard for them to guarantee 100% accuracy > (leaving aside the issue of dynamic rule generation), > as makefile syntax may slightly change from version to version. > > > Thanks, Rakesh > > -- > Reinier Post > TU Eindhoven > > _______________________________________________ > Help-make mailing list > [email protected] > https://lists.gnu.org/mailman/listinfo/help-make _______________________________________________ Help-make mailing list [email protected] https://lists.gnu.org/mailman/listinfo/help-make
