[Buildroot] [PATCH 3/4] Makefile: expose 'graph-depends' to generate a graph of the dependency tree
Thomas Petazzoni
thomas.petazzoni at free-electrons.com
Sat Dec 28 12:06:47 UTC 2013
Dear Yann E. MORIN,
On Sat, 28 Dec 2013 12:56:34 +0100, Yann E. MORIN wrote:
> > Why isn't that one done in the package infrastructure, i.e in
> > pkg-generic.mk ?
>
> For two reasons:
> - to have both graph-depends and %-graph-depends side-by-side, so it
> is easier to update the rules,
Right, that's a pretty good reason.
> - to limit the number of rules in the Makefile, which is already a bit
> long to parse.
Well, you still have the rule in pkg-generic.mk, which you added to
make the completion work. So practically speaking, the number of rules
is the same.
> I initially added that in package/pkg-generic.mk:
> $(1)-graph-depends:
> @install -d $(O)/graphs
Should be $(INSTALL) maybe?
> @./support/scripts/graph-depends $(1) \
> |dot -Tpdf \
> -o $(O)/graphs/$$(@).pdf
>
> But this adds yet another rule per-package to the Makefile. So for the
> reasons above, I decided to move it with graph-depends.
>
> But I don't really care, I can change it back to a per-package rule.
To me, it makes more sense to have all the per-package rules in the
package infrastructure, but that's not a very strong opinion, since the
argument of having both the per-package and the global rules together
also makes sense.
Best regards,
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
More information about the buildroot
mailing list