From: Charles Manning <cdhmanning@gmail.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH] Add a config override file capability.
Date: Thu, 20 Dec 2012 12:25:19 +1300 [thread overview]
Message-ID: <1355959519-11726-1-git-send-email-cdhmanning@gmail.com> (raw)
This is similar to the package override capability and allows the overriding
of configuration symbols without modifying .config.
Why? Same reason as having package overriding...
Examples:
1) Might need to override svn on a user-by-user basis to add --username
2) Might want to be able to set versions of code fetched from svn without
changing the .config. Just put the overriding symbols in the override file.
The override file is included straight after .config in the Makefile, so
this limits what should be done there...
Signed-off-by: Charles Manning <cdhmanning@gmail.com>
---
Config.in | 7 +++++++
Makefile | 9 +++++++++
2 files changed, 16 insertions(+), 0 deletions(-)
diff --git a/Config.in b/Config.in
index b319ac7..9f42a26 100644
--- a/Config.in
+++ b/Config.in
@@ -419,6 +419,13 @@ config BR2_PACKAGE_OVERRIDE_FILE
as the source directory for a particular package. See the
Buildroot documentation for more details on this feature.
+config BR2_CONFIG_OVERRIDE_FILE
+ string "location of a configuration override file"
+ help
+ A configuration override file is a short makefile that contains
+ variable definitions of the form BR2_xxx to override configurations
+ in the .config configuration file.
+
endmenu
source "toolchain/Config.in"
diff --git a/Makefile b/Makefile
index 4b09437..d133a27 100644
--- a/Makefile
+++ b/Makefile
@@ -94,6 +94,15 @@ endif
# Pull in the user's configuration file
ifeq ($(filter $(noconfig_targets),$(MAKECMDGOALS)),)
-include $(CONFIG_DIR)/.config
+
+# Include the config override file if one has been provided in the
+# configuration.
+CONFIG_OVERRIDE_FILE=$(call qstrip,$(BR2_CONFIG_OVERRIDE_FILE))
+ifneq ($(CONFIG_OVERRIDE_FILE),)
+$(warning Overriding configuration with $(CONFIG_OVERRIDE_FILE))
+include $(CONFIG_OVERRIDE_FILE)
+endif
+
endif
# To put more focus on warnings, be less verbose as default
--
1.7.1
reply other threads:[~2012-12-19 23:25 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=1355959519-11726-1-git-send-email-cdhmanning@gmail.com \
--to=cdhmanning@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