Export BR2_EXTERNAL for post-build/support scripts
PATCH 1/1 Export BR2_EXTERNAL for post-build/support scripts
Especially post-build scripts might want to make use of BR2_EXTERNAL variable, so export it.
--- Makefile | 1 + 1 file changed, 1 insertion(+)
Makefile +1 -0
@@ -349,6 +349,7 @@ endif # Scripts in support/ or post-build scripts may need to reference # these locations, so export them so it is easier to use export BR2_CONFIG +export BR2_EXTERNAL export TARGET_DIR export STAGING_DIR export HOST_DIR
Signature · 1 line
2.2.1
PATCH 1/1 Export BR2_EXTERNAL for post-build/support scripts
Julian, All,
On 2015-02-04 16:34 +0100, Julian Scheel spake thusly:
Quoted 2 lines
Especially post-build scripts might want to make use of
BR2_EXTERNALvariable, so export it.
As discussed on IRC, there is another solution to export BR2_EXTERNAL, which is to add it to EXTRA_ENV, like so:
br2-external: make it available to post-{build,image} scripts
Currently, BR2_EXTERNAL is not always exported to sub-processes that we spawn, like post-build or post-image scripts. This all depends on how the user passes BR2_EXTERNAL; consider the following:
- make BR2_EXTERNAL=/path/to/br2-ext
- BR2_EXTERNAL=/path/to/br2-ext make
In the first case, it is just a make variable, not an environment variable, and thus not exported, while in the second case it is an environment variable and gets exported to all sub-processes make may spawn.
Explicitly export it using EXTRA_ENV.
---
package/Makefile.in | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/package/Makefile.in b/package/Makefile.in index 70529f8..803b162 100644
--- a/package/Makefile.in
+++ b/package/Makefile.in
@@ -326,7 +326,8 @@ HOST_MAKE_ENV = \
EXTRA_ENV = \
PATH=$(BR_PATH) \
BR2_DL_DIR=$(BR2_DL_DIR) \
-BUILD_DIR=$(BUILD_DIR) +BUILD_DIR=$(BUILD_DIR) \
+BR2_EXTERNAL=$(BR2_EXTERNAL)
################################################################################
# settings we need to pass to configure
Regards,
Yann E. MORIN.
Quoted 24 lines
Signed-off-by Julian Scheel <[email protected]>--- Makefile | 1 + 1 file changed, 1 insertion(+)Makefile +1
-0@@ -349,6 +349,7 @@ endif # Scripts in support/ or post-build scripts may need to reference # these locations, so export them so it is easier to use export BR2_CONFIG +export BR2_EXTERNAL export TARGET_DIR export STAGING_DIR export HOST_DIRSignature · 6 lines
2.2.1 _______________________________________________ buildroot mailing list buildroot at busybox.net http://lists.busybox.net/mailman/listinfo/buildroot
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------. | 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. | '------------------------------^-------^------------------^--------------------'
PATCH 1/1 Export BR2_EXTERNAL for post-build/support scripts
Julian, All,
On 2015-02-04 17:19 +0100, Yann E. MORIN spake thusly:
Quoted 6 lines
On 2015-02-04 16:34 +0100, Julian Scheel spake thusly:
Quoted 2 lines
Especially post-build scripts might want to make use of
BR2_EXTERNALvariable, so export it.As discussed on IRC, there is another solution to export
BR2_EXTERNAL, which is to add it toEXTRA_ENV, like so:
[--SNIP--]
And to complete my previous reply: I don;t really mind which way we're doing it: your solution or mine are equaly acceptable to me.
Regards,
Yann E. MORIN.
Quoted 36 lines
Quoted 24 lines
Signed-off-by Julian Scheel <[email protected]>--- Makefile | 1 + 1 file changed, 1 insertion(+)Makefile +1
-0@@ -349,6 +349,7 @@ endif # Scripts in support/ or post-build scripts may need to reference # these locations, so export them so it is easier to use export BR2_CONFIG +export BR2_EXTERNAL export TARGET_DIR export STAGING_DIR export HOST_DIRSignature · 6 lines
2.2.1 _______________________________________________ buildroot mailing list buildroot at busybox.net http://lists.busybox.net/mailman/listinfo/buildrootSignature · 10 lines
.-----------------.--------------------.------------------.--------------------. | 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. | '------------------------------^-------^------------------^--------------------' _______________________________________________ buildroot mailing list buildroot at busybox.net http://lists.busybox.net/mailman/listinfo/buildroot
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------. | 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. | '------------------------------^-------^------------------^--------------------'
PATCH 1/1 Export BR2_EXTERNAL for post-build/support scripts
Hi Yann, Julian, All,
Le 04/02/2015 17:21, Yann E. MORIN a ?crit :
Quoted 22 lines
Julian, All,
On 2015-02-04 17:19 +0100, Yann E. MORIN spake thusly:
Quoted 6 lines
On 2015-02-04 16:34 +0100, Julian Scheel spake thusly:
Quoted 2 lines
Especially post-build scripts might want to make use of
BR2_EXTERNALvariable, so export it.As discussed on IRC, there is another solution to export
BR2_EXTERNAL, which is to add it toEXTRA_ENV, like so:[--SNIP--]
And to complete my previous reply: I don;t really mind which way we're doing it: your solution or mine are equaly acceptable to me.
Regards,
Yann E. MORIN.Quoted 5 lines
Quoted 5 lines
Signed-off-by Julian Scheel <[email protected]>--- Makefile | 1 + 1 file changed, 1 insertion(+)
Quoted 9 lines
Quoted 9 lines
Makefile endif · line 352
Quoted 9 lines
Makefile +1
-0@@ -349,6 +349,7 @@ endif # Scripts in support/ or post-build scripts may need to reference # these locations, so export them so it is easier to use export BR2_CONFIG +export BR2_EXTERNAL
I have applied the same patch to be able to use BR2_EXTERNAL in a post-image script. But I'm agree that adding BR2_EXTERNAL to EXTRA_ENV is enough.
Best regards,
Romain
Quoted 23 lines
Quoted 22 lines
Quoted 10 lines
Makefile +0
-0export TARGET_DIR export STAGING_DIR export HOST_DIRSignature · 6 lines
2.2.1 _______________________________________________ buildroot mailing list buildroot at busybox.net http://lists.busybox.net/mailman/listinfo/buildrootSignature · 10 lines
.-----------------.--------------------.------------------.--------------------. | 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. | '------------------------------^-------^------------------^--------------------' _______________________________________________ buildroot mailing list buildroot at busybox.net http://lists.busybox.net/mailman/listinfo/buildroot
PATCH 1/1 Export BR2_EXTERNAL for post-build/support scripts
In reply to Julian ScheelJulian, All,
On 2015-02-04 16:34 +0100, Julian Scheel spake thusly:
Quoted 2 lines
Especially post-build scripts might want to make use of
BR2_EXTERNALvariable, so export it.
Peter has applied the alternative patch I submitted.
Thanks for the report! :-)
Regards,
Yann E. MORIN.
Quoted 24 lines
Signed-off-by Julian Scheel <[email protected]>--- Makefile | 1 + 1 file changed, 1 insertion(+)Makefile +1
-0@@ -349,6 +349,7 @@ endif # Scripts in support/ or post-build scripts may need to reference # these locations, so export them so it is easier to use export BR2_CONFIG +export BR2_EXTERNAL export TARGET_DIR export STAGING_DIR export HOST_DIRSignature · 6 lines
2.2.1 _______________________________________________ buildroot mailing list buildroot at busybox.net http://lists.busybox.net/mailman/listinfo/buildroot
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------. | 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. | '------------------------------^-------^------------------^--------------------'