From 0cfe3ab88c6e1410ca719801147b1ba566c86d0d Mon Sep 17 00:00:00 2001 From: "Yann E. MORIN" Date: Sat, 28 Dec 2013 18:39:12 +0100 Subject: [PATCH] Makefile: expose 'graph-depends' to generate a graph of the dependency tree Generate the graph of the complete dependency tree by calling: make graph-depends It's also possible to generate the graph-depends for a single package: make PKG-graph-depends The graphs are generated in $(O)/graphs/ Signed-off-by: "Yann E. MORIN" Cc: Thomas Petazzoni Signed-off-by: Thomas Petazzoni --- Makefile | 7 +++++++ package/pkg-generic.mk | 5 +++++ 2 files changed, 12 insertions(+) diff --git a/Makefile b/Makefile index 98ca7980f4..8107865040 100644 --- a/Makefile +++ b/Makefile @@ -642,6 +642,11 @@ graph-build: $(O)/build/build-time.log --output=$(O)/graphs/build.pie-$(t).pdf \ $(if $(GRAPH_ALT),--alternate-colors)$(sep)) +graph-depends: + @$(INSTALL) -d $(O)/graphs + @./support/scripts/graph-depends \ + |dot -Tpdf -o $(O)/graphs/$(@).pdf + else # ifeq ($(BR2_HAVE_DOT_CONFIG),y) all: menuconfig @@ -814,6 +819,7 @@ help: @echo ' toolchain - build toolchain' @echo ' -rebuild - force recompile ' @echo ' -reconfigure - force reconfigure ' + @echo ' -graph-depends - generate graph of the dependency tree for package' @echo @echo 'Configuration:' @echo ' menuconfig - interactive curses-based configurator' @@ -855,6 +861,7 @@ endif @echo ' manual-text - build manual in text' @echo ' manual-epub - build manual in ePub' @echo ' graph-build - generate graphs of the build times' + @echo ' graph-depends - generate graph of the dependency tree' @echo @echo 'Miscellaneous:' @echo ' source - download all sources needed for offline-build' diff --git a/package/pkg-generic.mk b/package/pkg-generic.mk index 66034bac6b..8005ce99ff 100644 --- a/package/pkg-generic.mk +++ b/package/pkg-generic.mk @@ -468,6 +468,11 @@ endif $(1)-show-depends: @echo $$($(2)_DEPENDENCIES) +$(1)-graph-depends: + @$(INSTALL) -d $(O)/graphs + @./support/scripts/graph-depends $(1) \ + |dot -Tpdf -o $(O)/graphs/$$(@).pdf + $(1)-dirclean: $$($(2)_TARGET_DIRCLEAN) $(1)-clean-for-rebuild: