@@ -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"
@@ -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
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(-)