summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorArnout Vandecappelle <arnout@mind.be>2015-02-02 16:34:46 +0100
committerPeter Korsgaard <peter@korsgaard.com>2015-02-02 21:42:47 +0100
commit32babbf9744d09e3612150971b7121033b4b9925 (patch)
tree40fd9b409876f98a08646c55353e7b3dda881107 /Makefile
parentf4f62a3c16f8591b14eedc3564599c6c807820b4 (diff)
%_defconfig: save the path to the defconfig
We have the BR2_DEFCONFIG feature that saves the path to the defconfig file that was specified on the command line, so that a later savedefconfig would immediately save to the right location. This wasn't done for the defconfigs in the configs/ directory, however, to avoid accidentally overwriting them. Now we decided that it would be more useful to overwrite the defconfigs in the configs/ directory after all. To do this, we pass the path to that defconfig in the environment. Cc: Thomas De Schampheleire <thomas.de.schampheleire@gmail.com> Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> Tested-by: Thomas De Schampheleire <thomas.de.schampheleire@gmail.com> Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile7
1 files changed, 5 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index 6cee02796..9c870d929 100644
--- a/Makefile
+++ b/Makefile
@@ -786,13 +786,16 @@ defconfig: $(BUILD_DIR)/buildroot-config/conf outputmakefile
@mkdir -p $(BUILD_DIR)/buildroot-config
@$(COMMON_CONFIG_ENV) $< --defconfig$(if $(DEFCONFIG),=$(DEFCONFIG)) $(CONFIG_CONFIG_IN)
+# Override the BR2_DEFCONFIG from COMMON_CONFIG_ENV with the new defconfig
%_defconfig: $(BUILD_DIR)/buildroot-config/conf $(TOPDIR)/configs/%_defconfig outputmakefile
@mkdir -p $(BUILD_DIR)/buildroot-config
- @$(COMMON_CONFIG_ENV) $< --defconfig=$(TOPDIR)/configs/$@ $(CONFIG_CONFIG_IN)
+ @$(COMMON_CONFIG_ENV) BR2_DEFCONFIG=$(TOPDIR)/configs/$@ \
+ $< --defconfig=$(TOPDIR)/configs/$@ $(CONFIG_CONFIG_IN)
%_defconfig: $(BUILD_DIR)/buildroot-config/conf $(BR2_EXTERNAL)/configs/%_defconfig outputmakefile
@mkdir -p $(BUILD_DIR)/buildroot-config
- @$(COMMON_CONFIG_ENV) $< --defconfig=$(BR2_EXTERNAL)/configs/$@ $(CONFIG_CONFIG_IN)
+ @$(COMMON_CONFIG_ENV) BR2_DEFCONFIG=$(BR2_EXTERNAL)/configs/$@ \
+ $< --defconfig=$(BR2_EXTERNAL)/configs/$@ $(CONFIG_CONFIG_IN)
savedefconfig: $(BUILD_DIR)/buildroot-config/conf outputmakefile
@mkdir -p $(BUILD_DIR)/buildroot-config