tag:blogger.com,1999:blog-7317348216081392029.post3262744680248272562..comments2024-02-10T00:32:23.158-08:00Comments on Things I do: Proposal to add build graph output to GNU MakeJonas Danielssonhttp://www.blogger.com/profile/04799688851937428458noreply@blogger.comBlogger2125tag:blogger.com,1999:blog-7317348216081392029.post-84291818639213696462020-10-28T00:49:05.270-07:002020-10-28T00:49:05.270-07:00Thanks!
Recursive invocation limit the feature a ...Thanks!<br /><br />Recursive invocation limit the feature a bit. At least in the same regard as recursive make is limiting in general, you lose the complete picture of the dependencies.<br /><br />Autotools and recursive make is why I chose to use a flag "-g" and that the graph files are named after the make goals. And not provide a filename, it allows us to support the recursive make case pretty well. The trick, for automake, is to use AM_MAKEFLAGS.<br /><br />We can take strace as an example.<br /><br /><br />$ ./configure<br />[...]<br />$ AM_MAKEFLAGS="-g" make -g<br />[...]<br />$ find . -name \*.dot<br />./tests-m32/all.dot<br />./tests/all.dot<br />./all-recursive.dot<br />./all.dot<br />./tests-mx32/all.dot<br />./all-am.dot<br /><br />This gives us graph files for each of the different invocations / recursions. The meat of building strace is in the all-am dot file. We lose the overview because of the use of recursive make, but we get a bit of insight into the automake machinery by which dot files are produced.Jonas Danielssonhttps://www.blogger.com/profile/04799688851937428458noreply@blogger.comtag:blogger.com,1999:blog-7317348216081392029.post-65786036460306686052020-10-27T13:59:58.179-07:002020-10-27T13:59:58.179-07:00great idea, but as a lot of projects use make via ...great idea, but as a lot of projects use make via autotools, which has a recursive approach, doesn't that limit the usefulness of the feature?Anonymoushttps://www.blogger.com/profile/14162936013888072398noreply@blogger.com