* [Buildroot] [PATCH] graph-depends: fix when $(O) is a relative path @ 2014-06-18 22:10 Arnout Vandecappelle 2014-06-20 20:04 ` Yann E. MORIN ` (2 more replies) 0 siblings, 3 replies; 11+ messages in thread From: Arnout Vandecappelle @ 2014-06-18 22:10 UTC (permalink / raw) To: buildroot The graph-depends commands cd into the CONFIG_DIR and run the script from there. However, this means that when $(O) is a relative path, it will no longer be correct. Therefore, use $(BASE_DIR) instead of $(O). Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> --- Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 5c82355..dd350b6 100644 --- a/Makefile +++ b/Makefile @@ -676,8 +676,8 @@ graph-depends: @$(INSTALL) -d $(O)/graphs @cd "$(CONFIG_DIR)"; \ $(TOPDIR)/support/scripts/graph-depends $(BR2_GRAPH_DEPS_OPTS) \ - |tee $(O)/graphs/$(@).dot \ - |dot $(BR2_GRAPH_DOT_OPTS) -T$(BR_GRAPH_OUT) -o $(O)/graphs/$(@).$(BR_GRAPH_OUT) + |tee $(BASE_DIR)/graphs/$(@).dot \ + |dot $(BR2_GRAPH_DOT_OPTS) -T$(BR_GRAPH_OUT) -o $(BASE_DIR)/graphs/$(@).$(BR_GRAPH_OUT) else # ifeq ($(BR2_HAVE_DOT_CONFIG),y) -- 2.0.0 ^ permalink raw reply related [flat|nested] 11+ messages in thread
* [Buildroot] [PATCH] graph-depends: fix when $(O) is a relative path 2014-06-18 22:10 [Buildroot] [PATCH] graph-depends: fix when $(O) is a relative path Arnout Vandecappelle @ 2014-06-20 20:04 ` Yann E. MORIN 2014-06-20 20:07 ` Arnout Vandecappelle 2014-06-23 20:51 ` Yann E. MORIN 2014-06-20 20:55 ` Yann E. MORIN 2014-06-29 8:52 ` Thomas Petazzoni 2 siblings, 2 replies; 11+ messages in thread From: Yann E. MORIN @ 2014-06-20 20:04 UTC (permalink / raw) To: buildroot Arnout, All, On 2014-06-19 00:10 +0200, Arnout Vandecappelle (Essensium/Mind) spake thusly: > The graph-depends commands cd into the CONFIG_DIR and run the script > from there. However, this means that when $(O) is a relative path, it > will no longer be correct. Therefore, use $(BASE_DIR) instead of $(O). > > Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> Tested with this sequence: cd buildroot make manual-html make O=../br.build-1 manual-html cd .. make -C buildroot O=../br.build-2 manual-html make -C buildroot O=$(pwd)/br.build-3 mkdir br.build-4 cd br.build-4 make defconfig (to create the Makefile wrapper) make manual-html All generate the HTML manual, and a cursory look does not show any diference. Tested-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Acked-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Regards, Yann E. MORIN. > --- > Makefile | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/Makefile b/Makefile > index 5c82355..dd350b6 100644 > --- a/Makefile > +++ b/Makefile > @@ -676,8 +676,8 @@ graph-depends: > @$(INSTALL) -d $(O)/graphs > @cd "$(CONFIG_DIR)"; \ > $(TOPDIR)/support/scripts/graph-depends $(BR2_GRAPH_DEPS_OPTS) \ > - |tee $(O)/graphs/$(@).dot \ > - |dot $(BR2_GRAPH_DOT_OPTS) -T$(BR_GRAPH_OUT) -o $(O)/graphs/$(@).$(BR_GRAPH_OUT) > + |tee $(BASE_DIR)/graphs/$(@).dot \ > + |dot $(BR2_GRAPH_DOT_OPTS) -T$(BR_GRAPH_OUT) -o $(BASE_DIR)/graphs/$(@).$(BR_GRAPH_OUT) > > else # ifeq ($(BR2_HAVE_DOT_CONFIG),y) > > -- > 2.0.0 > > _______________________________________________ > buildroot mailing list > buildroot at busybox.net > http://lists.busybox.net/mailman/listinfo/buildroot -- .-----------------.--------------------.------------------.--------------------. | Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: | | +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ | | +33 223 225 172 `------------.-------: X AGAINST | \e/ There is no | | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. | '------------------------------^-------^------------------^--------------------' ^ permalink raw reply [flat|nested] 11+ messages in thread
* [Buildroot] [PATCH] graph-depends: fix when $(O) is a relative path 2014-06-20 20:04 ` Yann E. MORIN @ 2014-06-20 20:07 ` Arnout Vandecappelle 2014-06-20 20:14 ` Yann E. MORIN 2014-06-23 20:51 ` Yann E. MORIN 1 sibling, 1 reply; 11+ messages in thread From: Arnout Vandecappelle @ 2014-06-20 20:07 UTC (permalink / raw) To: buildroot On 20/06/14 22:04, Yann E. MORIN wrote: > Arnout, All, > > On 2014-06-19 00:10 +0200, Arnout Vandecappelle (Essensium/Mind) spake thusly: >> The graph-depends commands cd into the CONFIG_DIR and run the script >> from there. However, this means that when $(O) is a relative path, it >> will no longer be correct. Therefore, use $(BASE_DIR) instead of $(O). >> >> Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> > > Tested with this sequence: > cd buildroot > make manual-html > make O=../br.build-1 manual-html > cd .. > make -C buildroot O=../br.build-2 manual-html > make -C buildroot O=$(pwd)/br.build-3 > mkdir br.build-4 > cd br.build-4 > make defconfig (to create the Makefile wrapper) > make manual-html Call me stupid, but why is it relevant to test this patch with manual-html? Regards, Arnout > > All generate the HTML manual, and a cursory look does not show any > diference. > > Tested-by: "Yann E. MORIN" <yann.morin.1998@free.fr> > Acked-by: "Yann E. MORIN" <yann.morin.1998@free.fr> > > Regards, > Yann E. MORIN. > >> --- >> Makefile | 4 ++-- >> 1 file changed, 2 insertions(+), 2 deletions(-) >> >> diff --git a/Makefile b/Makefile >> index 5c82355..dd350b6 100644 >> --- a/Makefile >> +++ b/Makefile >> @@ -676,8 +676,8 @@ graph-depends: >> @$(INSTALL) -d $(O)/graphs >> @cd "$(CONFIG_DIR)"; \ >> $(TOPDIR)/support/scripts/graph-depends $(BR2_GRAPH_DEPS_OPTS) \ >> - |tee $(O)/graphs/$(@).dot \ >> - |dot $(BR2_GRAPH_DOT_OPTS) -T$(BR_GRAPH_OUT) -o $(O)/graphs/$(@).$(BR_GRAPH_OUT) >> + |tee $(BASE_DIR)/graphs/$(@).dot \ >> + |dot $(BR2_GRAPH_DOT_OPTS) -T$(BR_GRAPH_OUT) -o $(BASE_DIR)/graphs/$(@).$(BR_GRAPH_OUT) >> >> else # ifeq ($(BR2_HAVE_DOT_CONFIG),y) >> >> -- >> 2.0.0 >> >> _______________________________________________ >> buildroot mailing list >> buildroot at busybox.net >> http://lists.busybox.net/mailman/listinfo/buildroot > -- Arnout Vandecappelle arnout at mind be Senior Embedded Software Architect +32-16-286500 Essensium/Mind http://www.mind.be G.Geenslaan 9, 3001 Leuven, Belgium BE 872 984 063 RPR Leuven LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle GPG fingerprint: 7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F ^ permalink raw reply [flat|nested] 11+ messages in thread
* [Buildroot] [PATCH] graph-depends: fix when $(O) is a relative path 2014-06-20 20:07 ` Arnout Vandecappelle @ 2014-06-20 20:14 ` Yann E. MORIN 0 siblings, 0 replies; 11+ messages in thread From: Yann E. MORIN @ 2014-06-20 20:14 UTC (permalink / raw) To: buildroot Arnout, All, On 2014-06-20 22:07 +0200, Arnout Vandecappelle spake thusly: > On 20/06/14 22:04, Yann E. MORIN wrote: > > Arnout, All, > > > > On 2014-06-19 00:10 +0200, Arnout Vandecappelle (Essensium/Mind) spake thusly: > >> The graph-depends commands cd into the CONFIG_DIR and run the script > >> from there. However, this means that when $(O) is a relative path, it > >> will no longer be correct. Therefore, use $(BASE_DIR) instead of $(O). > >> > >> Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> > > > > Tested with this sequence: > > cd buildroot > > make manual-html > > make O=../br.build-1 manual-html > > cd .. > > make -C buildroot O=../br.build-2 manual-html > > make -C buildroot O=$(pwd)/br.build-3 > > mkdir br.build-4 > > cd br.build-4 > > make defconfig (to create the Makefile wrapper) > > make manual-html > > Call me stupid, but why is it relevant to test this patch with manual-html? Err... Hmm... Well... OK, back to the shell I am... ;-) Sorry, sorry, sorry... Regards, Yann E. MORIN. -- .-----------------.--------------------.------------------.--------------------. | Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: | | +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ | | +33 223 225 172 `------------.-------: X AGAINST | \e/ There is no | | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. | '------------------------------^-------^------------------^--------------------' ^ permalink raw reply [flat|nested] 11+ messages in thread
* [Buildroot] [PATCH] graph-depends: fix when $(O) is a relative path 2014-06-20 20:04 ` Yann E. MORIN 2014-06-20 20:07 ` Arnout Vandecappelle @ 2014-06-23 20:51 ` Yann E. MORIN 1 sibling, 0 replies; 11+ messages in thread From: Yann E. MORIN @ 2014-06-23 20:51 UTC (permalink / raw) To: buildroot Arnout, All, On 2014-06-20 22:04 +0200, Yann E. MORIN spake thusly: > On 2014-06-19 00:10 +0200, Arnout Vandecappelle (Essensium/Mind) spake thusly: > > The graph-depends commands cd into the CONFIG_DIR and run the script > > from there. However, this means that when $(O) is a relative path, it > > will no longer be correct. Therefore, use $(BASE_DIR) instead of $(O). > > > > Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> > Tested-by: "Yann E. MORIN" <yann.morin.1998@free.fr> > Acked-by: "Yann E. MORIN" <yann.morin.1998@free.fr> OK, these are still valid, but for other reasons! Tested with the test-case by Arnout: make O=my-output defconfig make O=my-output graph-depends plus another deviation from this test-case: make -C buildroot O=my-output defconfig make -C buildroot O=my-output graph-depends Regards, Yann E. MORIN. -- .-----------------.--------------------.------------------.--------------------. | Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: | | +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ | | +33 223 225 172 `------------.-------: X AGAINST | \e/ There is no | | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. | '------------------------------^-------^------------------^--------------------' ^ permalink raw reply [flat|nested] 11+ messages in thread
* [Buildroot] [PATCH] graph-depends: fix when $(O) is a relative path 2014-06-18 22:10 [Buildroot] [PATCH] graph-depends: fix when $(O) is a relative path Arnout Vandecappelle 2014-06-20 20:04 ` Yann E. MORIN @ 2014-06-20 20:55 ` Yann E. MORIN 2014-06-23 5:28 ` Arnout Vandecappelle 2014-06-29 8:52 ` Thomas Petazzoni 2 siblings, 1 reply; 11+ messages in thread From: Yann E. MORIN @ 2014-06-20 20:55 UTC (permalink / raw) To: buildroot Arnout, All, On 2014-06-19 00:10 +0200, Arnout Vandecappelle (Essensium/Mind) spake thusly: > The graph-depends commands cd into the CONFIG_DIR and run the script > from there. However, this means that when $(O) is a relative path, it > will no longer be correct. Therefore, use $(BASE_DIR) instead of $(O). > > Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> Suddenly I realised that something must be wrong with this patch. $(O) is always expected to be relative the buildroot tree, not the current directory: http://nightly.buildroot.org/#_building_out_of_tree ---8<--- Note: the O path can be either an absolute or a relative path, but if it?s passed as a relative path, it is important to note that it is interpreted relative to the main Buildroot source directory, not the current working directory. ---8<--- So I fail to see what case this patch is supposed to fix. I tried with thisscript, and did not notice any difference between the two runs, one with master, the second with the patch applied: #!/bin/sh set -e BR="${HOME}/cache/upstream/buildroot" rm -rf br* do_prep() { local dir="${1}" ( git clone "${BR}" "${dir}" cd "${dir}" git pwam 361761 # Comment-out to use master ) } echo '======== In-tree' do_prep br-1 cd br-1 make defconfig make graph-depends cd .. echo '======== Out-of-tree, called out of top-dir, relative' do_prep br-2 mkdir br.build-2 make -C br-2 O=../br.build-2 defconfig make -C br-2 O=../br.build-2 graph-depends echo '======== Out-of-tree, called from top-dir, relative' do_prep br-3 mkdir br.build-3 cd br-3 make O=../br.build-3 defconfig make O=../br.build-3 graph-depends cd .. echo '======== Out-of-tree, called from O-dir, absolute' do_prep br-4 mkdir br.build-4 cd br.build-4 make -C ../br-4 O=$(pwd) defconfig make graph-depends cd .. echo '======== Out-of-tree, called out of top-dir, absolute ' do_prep br-5 mkdir br.build-5 make -C br-4 O=$(pwd)/br.build-5 defconfig make -C br-4 O=$(pwd)/br.build-5 graph-depends echo '======== Out-of-tree, called fromother dir, absolute-relative' do_prep br-6 mkdir br.build-6.1 mkdir br.build-6.2 cd br.build-6.1 make -C ../br-6 O=$(pwd)/../br.build-6.2 defconfig make -C ../br-6 O=$(pwd)/../br.build-6.2 graph-depends cd .. In both cases (with or without the patch), cases 1, 3 and 4 succeed, while cases 2, 5 and 6 fail. What case(s) did I miss? Regards, Yann E. MORIN. > --- > Makefile | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/Makefile b/Makefile > index 5c82355..dd350b6 100644 > --- a/Makefile > +++ b/Makefile > @@ -676,8 +676,8 @@ graph-depends: > @$(INSTALL) -d $(O)/graphs > @cd "$(CONFIG_DIR)"; \ > $(TOPDIR)/support/scripts/graph-depends $(BR2_GRAPH_DEPS_OPTS) \ > - |tee $(O)/graphs/$(@).dot \ > - |dot $(BR2_GRAPH_DOT_OPTS) -T$(BR_GRAPH_OUT) -o $(O)/graphs/$(@).$(BR_GRAPH_OUT) > + |tee $(BASE_DIR)/graphs/$(@).dot \ > + |dot $(BR2_GRAPH_DOT_OPTS) -T$(BR_GRAPH_OUT) -o $(BASE_DIR)/graphs/$(@).$(BR_GRAPH_OUT) > > else # ifeq ($(BR2_HAVE_DOT_CONFIG),y) > > -- > 2.0.0 > > _______________________________________________ > buildroot mailing list > buildroot at busybox.net > http://lists.busybox.net/mailman/listinfo/buildroot -- .-----------------.--------------------.------------------.--------------------. | Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: | | +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ | | +33 223 225 172 `------------.-------: X AGAINST | \e/ There is no | | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. | '------------------------------^-------^------------------^--------------------' ^ permalink raw reply [flat|nested] 11+ messages in thread
* [Buildroot] [PATCH] graph-depends: fix when $(O) is a relative path 2014-06-20 20:55 ` Yann E. MORIN @ 2014-06-23 5:28 ` Arnout Vandecappelle 2014-06-23 17:03 ` Yann E. MORIN 0 siblings, 1 reply; 11+ messages in thread From: Arnout Vandecappelle @ 2014-06-23 5:28 UTC (permalink / raw) To: buildroot On 20/06/14 22:55, Yann E. MORIN wrote: > Arnout, All, > > On 2014-06-19 00:10 +0200, Arnout Vandecappelle (Essensium/Mind) spake thusly: >> The graph-depends commands cd into the CONFIG_DIR and run the script >> from there. However, this means that when $(O) is a relative path, it >> will no longer be correct. Therefore, use $(BASE_DIR) instead of $(O). >> >> Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> > > Suddenly I realised that something must be wrong with this patch. > $(O) is always expected to be relative the buildroot tree, not the > current directory: > http://nightly.buildroot.org/#_building_out_of_tree > > ---8<--- > Note: the O path can be either an absolute or a relative path, but > if it?s passed as a relative path, it is important to note that it is > interpreted relative to the main Buildroot source directory, not the > current working directory. > ---8<--- > > So I fail to see what case this patch is supposed to fix. > > I tried with thisscript, and did not notice any difference between the > two runs, one with master, the second with the patch applied: > > #!/bin/sh > set -e > > BR="${HOME}/cache/upstream/buildroot" > rm -rf br* > > do_prep() { > local dir="${1}" > ( > git clone "${BR}" "${dir}" > cd "${dir}" > git pwam 361761 # Comment-out to use master > ) > } > > echo '======== In-tree' > do_prep br-1 > cd br-1 > make defconfig > make graph-depends > cd .. > > echo '======== Out-of-tree, called out of top-dir, relative' > do_prep br-2 > mkdir br.build-2 > make -C br-2 O=../br.build-2 defconfig > make -C br-2 O=../br.build-2 graph-depends > > echo '======== Out-of-tree, called from top-dir, relative' > do_prep br-3 > mkdir br.build-3 > cd br-3 > make O=../br.build-3 defconfig > make O=../br.build-3 graph-depends > cd .. > > echo '======== Out-of-tree, called from O-dir, absolute' > do_prep br-4 > mkdir br.build-4 > cd br.build-4 > make -C ../br-4 O=$(pwd) defconfig > make graph-depends > cd .. > > echo '======== Out-of-tree, called out of top-dir, absolute ' > do_prep br-5 > mkdir br.build-5 > make -C br-4 O=$(pwd)/br.build-5 defconfig > make -C br-4 O=$(pwd)/br.build-5 graph-depends > > echo '======== Out-of-tree, called fromother dir, absolute-relative' > do_prep br-6 > mkdir br.build-6.1 > mkdir br.build-6.2 > cd br.build-6.1 > make -C ../br-6 O=$(pwd)/../br.build-6.2 defconfig > make -C ../br-6 O=$(pwd)/../br.build-6.2 graph-depends > cd .. > > In both cases (with or without the patch), cases 1, 3 and 4 succeed, > while cases 2, 5 and 6 fail. > > What case(s) did I miss? First of all, for me all these cases succeed both with and without the patch. Unfortunately, the example you took happens to work by accident: $ make -n O=../br.build graph-depends dot -? >/dev/null 2>&1 || \ (echo "ERROR: The 'dot' program from Graphviz is needed for graph-depends" >&2; exit 1) /usr/bin/install -d ../br.build/graphs cd "../br.build"; \ /home/arnout/src/buildroot/support/scripts/graph-depends \ |tee ../br.build/graphs/graph-depends.dot \ |dot -Tpdf -o ../br.build/graphs/graph-depends.pdf Since we cd into ../br.build and then resolve $(O) as ../br.build, it just happens to be the same directory. Using any other combination of . and .. a $(O) triggers the problem. So try do_prep br-7 make -C br-7 O=./br.build-7 defconfig make -C br-7 O=./br.build-7 graph-depends The graph-depends will fail with: tee: br.build-7/graphs/graph-depends.dot: No such file or directory Getting targets Getting dependencies for ['host-binutils', 'host-gmp', 'host-mpc', 'host-mpfr', 'uclibc', 'host-fakeroot', 'host-gcc-final', 'host-makedevs', 'toolchain-buildroot', 'toolchain', 'busybox', 'rootfs-tar'] Getting dependencies for ['host-m4', 'linux-headers', 'host-gcc-initial'] br.build-7/graphs/graph-depends.pdf: No such file or directory Makefile:677: recipe for target 'graph-depends' failed make: *** [graph-depends] Error 1 Regards, Arnout > > Regards, > Yann E. MORIN. > >> --- >> Makefile | 4 ++-- >> 1 file changed, 2 insertions(+), 2 deletions(-) >> >> diff --git a/Makefile b/Makefile >> index 5c82355..dd350b6 100644 >> --- a/Makefile >> +++ b/Makefile >> @@ -676,8 +676,8 @@ graph-depends: >> @$(INSTALL) -d $(O)/graphs >> @cd "$(CONFIG_DIR)"; \ >> $(TOPDIR)/support/scripts/graph-depends $(BR2_GRAPH_DEPS_OPTS) \ >> - |tee $(O)/graphs/$(@).dot \ >> - |dot $(BR2_GRAPH_DOT_OPTS) -T$(BR_GRAPH_OUT) -o $(O)/graphs/$(@).$(BR_GRAPH_OUT) >> + |tee $(BASE_DIR)/graphs/$(@).dot \ >> + |dot $(BR2_GRAPH_DOT_OPTS) -T$(BR_GRAPH_OUT) -o $(BASE_DIR)/graphs/$(@).$(BR_GRAPH_OUT) >> >> else # ifeq ($(BR2_HAVE_DOT_CONFIG),y) >> >> -- >> 2.0.0 >> >> _______________________________________________ >> buildroot mailing list >> buildroot at busybox.net >> http://lists.busybox.net/mailman/listinfo/buildroot > -- Arnout Vandecappelle arnout at mind be Senior Embedded Software Architect +32-16-286500 Essensium/Mind http://www.mind.be G.Geenslaan 9, 3001 Leuven, Belgium BE 872 984 063 RPR Leuven LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle GPG fingerprint: 7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F ^ permalink raw reply [flat|nested] 11+ messages in thread
* [Buildroot] [PATCH] graph-depends: fix when $(O) is a relative path 2014-06-23 5:28 ` Arnout Vandecappelle @ 2014-06-23 17:03 ` Yann E. MORIN 2014-06-23 19:16 ` Arnout Vandecappelle 0 siblings, 1 reply; 11+ messages in thread From: Yann E. MORIN @ 2014-06-23 17:03 UTC (permalink / raw) To: buildroot Arnout, All, On 2014-06-23 07:28 +0200, Arnout Vandecappelle spake thusly: > On 20/06/14 22:55, Yann E. MORIN wrote: > > On 2014-06-19 00:10 +0200, Arnout Vandecappelle (Essensium/Mind) spake thusly: > >> The graph-depends commands cd into the CONFIG_DIR and run the script > >> from there. However, this means that when $(O) is a relative path, it > >> will no longer be correct. Therefore, use $(BASE_DIR) instead of $(O). > >> > >> Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> > > I tried with thisscript, and did not notice any difference between the > > two runs, one with master, the second with the patch applied: [--SNIP long script--] > First of all, for me all these cases succeed both with and without the patch. You mean all the 6 cases do work for you? Weird. I don't see how it can work, since calling this make -C buildroot O=somewhere goal will not have the --no-print-directory option, and thus make would print its usual "Entering/Leaving directory blabla" which confuses graph-depends.py There is not much we can do about that, since our out-of-tree Makefile wrapper is never called. Even worse, if you do make -C buildroot O=somewhere defconfig make -C somewhere graph-depends then even though we do use our Makefile wrapper in this case, the --no-print-directory option is not used! So make would still print its "Entering/Leaving directory blabla" (and thus graph-depends will get confused.) > Using any other combination of . and .. a $(O) > triggers the problem. So try > > do_prep br-7 > make -C br-7 O=./br.build-7 defconfig > make -C br-7 O=./br.build-7 graph-depends OK, that's a use-case I was missing. > The graph-depends will fail with: > > tee: br.build-7/graphs/graph-depends.dot: No such file or directory > Getting targets > Getting dependencies for ['host-binutils', 'host-gmp', 'host-mpc', 'host-mpfr', > 'uclibc', 'host-fakeroot', 'host-gcc-final', 'host-makedevs', > 'toolchain-buildroot', 'toolchain', 'busybox', 'rootfs-tar'] > Getting dependencies for ['host-m4', 'linux-headers', 'host-gcc-initial'] > br.build-7/graphs/graph-depends.pdf: No such file or directory > Makefile:677: recipe for target 'graph-depends' failed > make: *** [graph-depends] Error 1 OK, it fails here, too, but your patch does not change anything: it fails without your patch, and it fails with your patch applied. I'm using make-3.81, if that shall be a differentiator. Regards, Yann E. MORIN. -- .-----------------.--------------------.------------------.--------------------. | Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: | | +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ | | +33 223 225 172 `------------.-------: X AGAINST | \e/ There is no | | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. | '------------------------------^-------^------------------^--------------------' ^ permalink raw reply [flat|nested] 11+ messages in thread
* [Buildroot] [PATCH] graph-depends: fix when $(O) is a relative path 2014-06-23 17:03 ` Yann E. MORIN @ 2014-06-23 19:16 ` Arnout Vandecappelle 2014-06-23 20:48 ` Yann E. MORIN 0 siblings, 1 reply; 11+ messages in thread From: Arnout Vandecappelle @ 2014-06-23 19:16 UTC (permalink / raw) To: buildroot On 23/06/14 19:03, Yann E. MORIN wrote: > Arnout, All, > > On 2014-06-23 07:28 +0200, Arnout Vandecappelle spake thusly: >> On 20/06/14 22:55, Yann E. MORIN wrote: >>> On 2014-06-19 00:10 +0200, Arnout Vandecappelle (Essensium/Mind) spake thusly: >>>> The graph-depends commands cd into the CONFIG_DIR and run the script >>>> from there. However, this means that when $(O) is a relative path, it >>>> will no longer be correct. Therefore, use $(BASE_DIR) instead of $(O). >>>> >>>> Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> >>> I tried with thisscript, and did not notice any difference between the >>> two runs, one with master, the second with the patch applied: > [--SNIP long script--] >> First of all, for me all these cases succeed both with and without the patch. > > You mean all the 6 cases do work for you? Weird. > > I don't see how it can work, since calling this > make -C buildroot O=somewhere goal > > will not have the --no-print-directory option, and thus make would print > its usual "Entering/Leaving directory blabla" which confuses > graph-depends.py Oh sorry, I didn't look at the output, just that it doesn't error out. > > There is not much we can do about that, since our out-of-tree Makefile > wrapper is never called. > > Even worse, if you do > make -C buildroot O=somewhere defconfig > make -C somewhere graph-depends > > then even though we do use our Makefile wrapper in this case, the > --no-print-directory option is not used! So make would still print its > "Entering/Leaving directory blabla" (and thus graph-depends will get > confused.) So why don't we just add --no-print-directory to the recursive make invocation from the script? Patch follows... > >> Using any other combination of . and .. a $(O) >> triggers the problem. So try >> >> do_prep br-7 >> make -C br-7 O=./br.build-7 defconfig >> make -C br-7 O=./br.build-7 graph-depends This one I didn't actually run like this, but like: make O=br.build-7 defconfig make O=br.build-7 graph-depends (from the buildroot directory). For that one, I checked that the PDF was OK, and then I just wrote it with -C in the mail. Stupid of me. Regards, Arnout > > OK, that's a use-case I was missing. > >> The graph-depends will fail with: >> >> tee: br.build-7/graphs/graph-depends.dot: No such file or directory >> Getting targets >> Getting dependencies for ['host-binutils', 'host-gmp', 'host-mpc', 'host-mpfr', >> 'uclibc', 'host-fakeroot', 'host-gcc-final', 'host-makedevs', >> 'toolchain-buildroot', 'toolchain', 'busybox', 'rootfs-tar'] >> Getting dependencies for ['host-m4', 'linux-headers', 'host-gcc-initial'] >> br.build-7/graphs/graph-depends.pdf: No such file or directory >> Makefile:677: recipe for target 'graph-depends' failed >> make: *** [graph-depends] Error 1 > > OK, it fails here, too, but your patch does not change anything: it > fails without your patch, and it fails with your patch applied. > > I'm using make-3.81, if that shall be a differentiator. > > Regards, > Yann E. MORIN. > -- Arnout Vandecappelle arnout at mind be Senior Embedded Software Architect +32-16-286500 Essensium/Mind http://www.mind.be G.Geenslaan 9, 3001 Leuven, Belgium BE 872 984 063 RPR Leuven LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle GPG fingerprint: 7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F ^ permalink raw reply [flat|nested] 11+ messages in thread
* [Buildroot] [PATCH] graph-depends: fix when $(O) is a relative path 2014-06-23 19:16 ` Arnout Vandecappelle @ 2014-06-23 20:48 ` Yann E. MORIN 0 siblings, 0 replies; 11+ messages in thread From: Yann E. MORIN @ 2014-06-23 20:48 UTC (permalink / raw) To: buildroot Arnout, All, On 2014-06-23 21:16 +0200, Arnout Vandecappelle spake thusly: > On 23/06/14 19:03, Yann E. MORIN wrote: > > On 2014-06-23 07:28 +0200, Arnout Vandecappelle spake thusly: > >> On 20/06/14 22:55, Yann E. MORIN wrote: > >>> On 2014-06-19 00:10 +0200, Arnout Vandecappelle (Essensium/Mind) spake thusly: > >>>> The graph-depends commands cd into the CONFIG_DIR and run the script > >>>> from there. However, this means that when $(O) is a relative path, it > >>>> will no longer be correct. Therefore, use $(BASE_DIR) instead of $(O). > >>>> > >>>> Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> > >>> I tried with thisscript, and did not notice any difference between the > >>> two runs, one with master, the second with the patch applied: > > [--SNIP long script--] > >> First of all, for me all these cases succeed both with and without the patch. > > > > You mean all the 6 cases do work for you? Weird. > > > > I don't see how it can work, since calling this > > make -C buildroot O=somewhere goal > > > > will not have the --no-print-directory option, and thus make would print > > its usual "Entering/Leaving directory blabla" which confuses > > graph-depends.py > > Oh sorry, I didn't look at the output, just that it doesn't error out. OK, no problem. ;-) make does not error out, because of the pipe, which only returns the status of the last command in the pipe. We can't do much about this... > > There is not much we can do about that, since our out-of-tree Makefile > > wrapper is never called. > > > > Even worse, if you do > > make -C buildroot O=somewhere defconfig > > make -C somewhere graph-depends > > > > then even though we do use our Makefile wrapper in this case, the > > --no-print-directory option is not used! So make would still print its > > "Entering/Leaving directory blabla" (and thus graph-depends will get > > confused.) > > So why don't we just add --no-print-directory to the recursive make invocation > from the script? Patch follows... Thanks! :-) > >> Using any other combination of . and .. a $(O) > >> triggers the problem. So try > >> > >> do_prep br-7 > >> make -C br-7 O=./br.build-7 defconfig > >> make -C br-7 O=./br.build-7 graph-depends > > This one I didn't actually run like this, but like: > > make O=br.build-7 defconfig > make O=br.build-7 graph-depends > > (from the buildroot directory). For that one, I checked that the PDF was OK, and > then I just wrote it with -C in the mail. Stupid of me. Well, that's yet another test-case! :-) OK, thanks for bearing with me all along! ;-) Regards, Yann E. MORIN. -- .-----------------.--------------------.------------------.--------------------. | Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: | | +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ | | +33 223 225 172 `------------.-------: X AGAINST | \e/ There is no | | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. | '------------------------------^-------^------------------^--------------------' ^ permalink raw reply [flat|nested] 11+ messages in thread
* [Buildroot] [PATCH] graph-depends: fix when $(O) is a relative path 2014-06-18 22:10 [Buildroot] [PATCH] graph-depends: fix when $(O) is a relative path Arnout Vandecappelle 2014-06-20 20:04 ` Yann E. MORIN 2014-06-20 20:55 ` Yann E. MORIN @ 2014-06-29 8:52 ` Thomas Petazzoni 2 siblings, 0 replies; 11+ messages in thread From: Thomas Petazzoni @ 2014-06-29 8:52 UTC (permalink / raw) To: buildroot Dear Arnout Vandecappelle (Essensium/Mind), On Thu, 19 Jun 2014 00:10:24 +0200, Arnout Vandecappelle (Essensium/Mind) wrote: > The graph-depends commands cd into the CONFIG_DIR and run the script > from there. However, this means that when $(O) is a relative path, it > will no longer be correct. Therefore, use $(BASE_DIR) instead of $(O). > > Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> > --- > Makefile | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) Applied, thanks. Thomas -- Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com ^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2014-06-29 8:52 UTC | newest] Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2014-06-18 22:10 [Buildroot] [PATCH] graph-depends: fix when $(O) is a relative path Arnout Vandecappelle 2014-06-20 20:04 ` Yann E. MORIN 2014-06-20 20:07 ` Arnout Vandecappelle 2014-06-20 20:14 ` Yann E. MORIN 2014-06-23 20:51 ` Yann E. MORIN 2014-06-20 20:55 ` Yann E. MORIN 2014-06-23 5:28 ` Arnout Vandecappelle 2014-06-23 17:03 ` Yann E. MORIN 2014-06-23 19:16 ` Arnout Vandecappelle 2014-06-23 20:48 ` Yann E. MORIN 2014-06-29 8:52 ` Thomas Petazzoni
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.