Makefile: support running graph-depends from out-of-tree
authorYann E. MORIN <yann.morin.1998@free.fr>
Tue, 7 Jan 2014 22:46:04 +0000 (23:46 +0100)
committerPeter Korsgaard <peter@korsgaard.com>
Thu, 9 Jan 2014 20:16:30 +0000 (21:16 +0100)
Reported-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
Makefile
package/pkg-generic.mk

index 6faa698dee10bdcadf9abe0e753e66443ab5496c..7624f593d6d6dfc51c8eb06bbc72a829aac69aa9 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -647,7 +647,8 @@ graph-build: $(O)/build/build-time.log
 
 graph-depends:
        @$(INSTALL) -d $(O)/graphs
-       @./support/scripts/graph-depends \
+       @cd "$(CONFIG_DIR)"; \
+       $(TOPDIR)/support/scripts/graph-depends \
        |dot -T$(BR2_GRAPH_OUT) -o $(O)/graphs/$(@).$(BR2_GRAPH_OUT)
 
 else # ifeq ($(BR2_HAVE_DOT_CONFIG),y)
index b519d6942cc4f094e2201818ed902ffa4e43e09d..1b99c2a25dbe2486193be77eb19de308d1b4dfc0 100644 (file)
@@ -470,7 +470,8 @@ $(1)-show-depends:
 
 $(1)-graph-depends:
                        @$(INSTALL) -d $(O)/graphs
-                       @./support/scripts/graph-depends $(1) \
+                       @cd "$(CONFIG_DIR)"; \
+                       $(TOPDIR)/support/scripts/graph-depends $(1) \
                        |dot -T$(BR2_GRAPH_OUT) -o $(O)/graphs/$$(@).$(BR2_GRAPH_OUT)
 
 $(1)-dirclean:         $$($(2)_TARGET_DIRCLEAN)