graphs: store and keep intermediate 'dot' program for graph-depends
authorYann E. MORIN <yann.morin.1998@free.fr>
Sat, 19 Apr 2014 20:17:08 +0000 (22:17 +0200)
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Sat, 19 Apr 2014 21:50:39 +0000 (23:50 +0200)
Currently, graph-depends (and PKG-graph-depends) do not store the
intermediate 'dot' program.

Some users would like to get the dot program to be able to further
customise the generated graphs (eg. modify the layout, colorise some
of the packages...)

So, store the intermediate dot program alongside the generated graph.

Reported-by: Maxime Hadjinlian <maxime.hadjinlian@gmail.com>
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Acked-by: "Maxime Hadjinlian" <maxime.hadjinlian@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Makefile
package/pkg-generic.mk

index 42adf7cc05ac9a794d0b8a3c5dade04f55634997..dd47f77ed693712912776c420d903f693e5f695a 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -670,6 +670,7 @@ graph-depends:
        @$(INSTALL) -d $(O)/graphs
        @cd "$(CONFIG_DIR)"; \
        $(TOPDIR)/support/scripts/graph-depends -d $(BR_GRAPH_DEPTH) \
+       |tee $(O)/graphs/$(@).dot \
        |dot -T$(BR_GRAPH_OUT) -o $(O)/graphs/$(@).$(BR_GRAPH_OUT)
 
 else # ifeq ($(BR2_HAVE_DOT_CONFIG),y)
index 8a62d4c120990652b3b72c8518d3b9e08cf87c27..cf02210a2573f389ae7cd747a616e37fdba2d0d8 100644 (file)
@@ -496,6 +496,7 @@ $(1)-graph-depends:
                        @$(INSTALL) -d $(O)/graphs
                        @cd "$(CONFIG_DIR)"; \
                        $(TOPDIR)/support/scripts/graph-depends -p $(1) -d $(BR_GRAPH_DEPTH) \
+                       |tee $(O)/graphs/$$(@).dot \
                        |dot -T$(BR_GRAPH_OUT) -o $(O)/graphs/$$(@).$(BR_GRAPH_OUT)
 
 $(1)-dirclean:         $$($(2)_TARGET_DIRCLEAN)