graph-depends: remove redundant dependencies
authorThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Wed, 2 Jan 2013 07:08:48 +0000 (07:08 +0000)
committerPeter Korsgaard <jacmet@sunsite.dk>
Wed, 2 Jan 2013 17:57:45 +0000 (18:57 +0100)
commit2404c0db7f32b5194d5a77c7a8040ad1dbf81a45
tree6e28ecca161254d00cadbba7434dc2b287c06009
parent7155fb7dd6386377eaf05b7436bc9c5dd024d0ad
graph-depends: remove redundant dependencies

When doing a full graph of the dependencies, graph-depends starts by
doing a "make show-targets", which lists all the packages registered
in the $(TARGETS) variable. This variable contains all packages that
are enabled according to the .config file. Then, for each of those
packages, we used to create a "all" -> "package" dependency, even if
in fact most of some packages are already dependencies of other
packages. This creates a needlessly complex dependency graph.

This patch modifies graph-depends so that it filters out the unneeded
"all" -> "package" dependencies when "package" is already the
dependency of another package.

For example, if you have a configuration with libpng (which selects
zlib), "make show-targets" displays "libpng zlib", so graph-depends
used to create the following dependencies: (all -> libpng, all ->
zlib, libpng -> zlib). However, the (all -> zlib) dependency is not
really needed, as zlib is already the dependency of libpng. Those
dependencies are now filtered out.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
support/scripts/graph-depends