Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH] package/Makefile.in: export O= to post-build/image scripts for out-of-tree builds
@ 2017-07-14 13:04 Peter Korsgaard
  2017-07-14 21:53 ` Yann E. MORIN
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Peter Korsgaard @ 2017-07-14 13:04 UTC (permalink / raw)
  To: buildroot

Sometimes it can be interesting to call back into buildroot from a
post-build/image script (E.G. make printvars or similar). For this to work
correctly with out-of-tree builds we need to pass O= to make, but this is
currently not available in the environment of post-build/image scripts.

In concept, O could be derrived from BUILD_DIR (E.G. by stripping /build),
but directly exporting O is cleaner.

O= cannot be exported globally as it interferes with various build systems,
so instead add it to EXTRA_ENV.

Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
---
 package/Makefile.in | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/package/Makefile.in b/package/Makefile.in
index b95e5e3fa8..a2b0d90f32 100644
--- a/package/Makefile.in
+++ b/package/Makefile.in
@@ -309,7 +309,8 @@ HOST_CONFIGURE_OPTS = \
 EXTRA_ENV = \
 	PATH=$(BR_PATH) \
 	BR2_DL_DIR=$(BR2_DL_DIR) \
-	BUILD_DIR=$(BUILD_DIR)
+	BUILD_DIR=$(BUILD_DIR) \
+	O=$(CANONICAL_O)
 
 ################################################################################
 # settings we need to pass to configure
-- 
2.11.0

^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2017-07-18 13:18 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-07-14 13:04 [Buildroot] [PATCH] package/Makefile.in: export O= to post-build/image scripts for out-of-tree builds Peter Korsgaard
2017-07-14 21:53 ` Yann E. MORIN
2017-07-15  8:11 ` Thomas Petazzoni
2017-07-17 20:52 ` Arnout Vandecappelle
2017-07-17 21:32   ` Peter Korsgaard
2017-07-17 21:34     ` Arnout Vandecappelle
2017-07-18 12:47       ` Peter Korsgaard
2017-07-18 13:18         ` Arnout Vandecappelle

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox