[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Diagramming a makefile?
From: |
Tim Murphy |
Subject: |
Re: Diagramming a makefile? |
Date: |
Mon, 14 Apr 2014 11:32:22 +0100 |
You can use the --print-database format to write out makes idea of the
targets and dependencies in the build. The output from this is quite
easy to parse using a language like python. This will take care of
all the issues with $(eval) etc.
You can make your script translate this information into "DOT"
notation and then you can load it into a graph display tool like
GEPHI.
https://gephi.org/
Gephi can handle graphs of the size you might get from e.g. an Android build.
You will then see a huge forest of dependencies, unless your build is
very small. You will wonder what use the graph is because it will
look like a pile of cut grass - with thousands of lines going all over
the place.
I think there are useful lessons to learn but not the ones that might
appear to be obvious.
Regards,
Tim
On 14 April 2014 06:44, Rakesh Sharma <address@hidden> 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.
>
> 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.
>
> Thanks,
> Rakesh
>
>
> _______________________________________________
> Help-make mailing list
> address@hidden
> https://lists.gnu.org/mailman/listinfo/help-make
--
You could help some brave and decent people to have access to
uncensored news by making a donation at:
http://www.thezimbabwean.co.uk/friends/