Skip to contentSkip to conversation

%_defconfig: save the path to the defconfig

PATCH New Arnout Vandecappelle (Essensium/Mind) 3 participants 3 messages Feb 2, 2015 Kbuild

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 %_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.

---
 Makefile | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)
Makefile +5 -2
index dd2b7b6..2192efd 100644
@@ -781,13 +781,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
Signature · 1 line
2.1.4
#1 lore raw

PATCH 1/1 %_defconfig: save the path to the defconfig

Quoted 6 lines · Arnout Vandecappelle (Essensium/Mind)

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.

Quoted 6 lines

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.

#2 lore raw

PATCH 1/1 %_defconfig: save the path to the defconfig

In reply to Arnout Vandecappelle (Essensium/Mind)
Quoted 8 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Arnout" == Arnout Vandecappelle (Essensium/Mind) <[email protected]> writes:

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.

Quoted 6 lines

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.

Committed, thanks.

Signature · 1 line
Bye, Peter Korsgaard