Skip to contentSkip to conversation

br2-external: make it available to post-{build, image} scripts

PATCH New Yann E. MORIN 2 participants 2 messages Feb 7, 2015

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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(-)
package/Makefile.in +2 -1
index 70529f8..803b162 100644
@@ -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
Signature · 1 line
1.9.1
#1 lore raw

PATCH 1/1 br2-external: make it available to post-{build, image} scripts

Quoted 14 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Yann" == Yann E MORIN <[email protected]> writes:

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.

Quoted 5 lines

Explicitly export it using EXTRA_ENV.

Committed, thanks.

Signature · 1 line
Bye, Peter Korsgaard