From: Samuel Martin <s.martin49@gmail.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH v12 1/3] core: split variables definition related to in/out-of-tree build from O itself
Date: Mon, 17 Oct 2016 23:05:41 +0200 [thread overview]
Message-ID: <20161017210543.21573-2-s.martin49@gmail.com> (raw)
In-Reply-To: <20161017210543.21573-1-s.martin49@gmail.com>
This change uncorrolates the CONFIG_DIR and NEED_WRAPPER definition from
the presence of the O variable in the command line.
Now, the condition used to set these variables is the value of O itself.
This change is a preparatory work since the O definition will need to
be moved around when we will make Buildroot run with absolute canonical
paths for both its root directory and the output location.
This will be addressed in a follow-up patch.
Signed-off-by: Samuel Martin <s.martin49@gmail.com>
Tested-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Acked-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Reviewed-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
---
changes v9->v10:
- update A/R/T tags
changes v8->v9:
- none
changes v7->v8:
- new patch
---
Makefile | 14 +++++++++++---
1 file changed, 11 insertions(+), 3 deletions(-)
diff --git a/Makefile b/Makefile
index a860218..2c0ac23 100644
--- a/Makefile
+++ b/Makefile
@@ -109,10 +109,11 @@ endif
# Include some helper macros and variables
include support/misc/utils.mk
+# Set O variable if not already done on the command line;
+# or avoid confusing packages that can use the O=<dir> syntax for out-of-tree
+# build by preventing it from being forwarded to sub-make calls.
ifneq ("$(origin O)", "command line")
O := output
-CONFIG_DIR := $(TOPDIR)
-NEED_WRAPPER =
else
# other packages might also support Linux-style out of tree builds
# with the O=<dir> syntax (E.G. BusyBox does). As make automatically
@@ -125,9 +126,16 @@ MAKEOVERRIDES =
# Unfortunately some packages don't look at origin (E.G. uClibc 0.9.31+)
# To really make O go away, we have to override it.
override O := $(O)
-CONFIG_DIR := $(O)
# we need to pass O= everywhere we call back into the toplevel makefile
EXTRAMAKEARGS = O=$(O)
+endif
+
+# Set variables related to in-tree or out-of-tree build.
+ifeq ($(O),output)
+CONFIG_DIR := $(TOPDIR)
+NEED_WRAPPER =
+else
+CONFIG_DIR := $(O)
NEED_WRAPPER = y
endif
--
2.10.0
next prev parent reply other threads:[~2016-10-17 21:05 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-10-17 21:05 [Buildroot] [PATCH v12 0/3] Relocatable SDK: preparatory changes Samuel Martin
2016-10-17 21:05 ` Samuel Martin [this message]
2016-10-17 21:05 ` [Buildroot] [PATCH v12 2/3] core: reorder top-level Makefile and document things Samuel Martin
2016-10-17 21:05 ` [Buildroot] [PATCH v12 3/3] core: re-enter make if $(CURDIR) or $(O) are not canonical paths Samuel Martin
2016-10-19 21:27 ` [Buildroot] [PATCH v12 0/3] Relocatable SDK: preparatory changes Thomas Petazzoni
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20161017210543.21573-2-s.martin49@gmail.com \
--to=s.martin49@gmail.com \
--cc=buildroot@busybox.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox