[Buildroot] [git commit branch/next] savedefconfig: Remove BR2_DEFCONFIG from saved defconfig file

From: Peter Korsgaard <peter@korsgaard.com>
Date: 2015-08-08 10:56:21
Subsystem: kernel build + files below scripts/ (unless maintained elsewhere), the rest · Maintainers: Nathan Chancellor, Nicolas Schier, Linus Torvalds

commit: http://git.buildroot.net/buildroot/commit/?id=f71a621d91ec27f175fc84012962f88b1107305f
branch: http://git.buildroot.net/buildroot/commit/?id=refs/heads/next

BR2_DEFCONFIG should not be present in saved defconfig file.

The use case is:
make qemu_arm_versatile
make savedefconfig BR2_DEFCONFIG=my_custom_defconfig

BR2_DEFCONFIG is set in my_custom_defconfig with an absolute path
to qemu_arm_versatile (value present in .config) and set in
my_custom_defconfig as it is different from default mentioned in
config.in (default is BR2_DEFCONFIG from environment).

On savedefconfig recipe, simply remove BR2_DEFCONFIG from generated file

[Peter: fixup typos and use SED as noted by Arnout]
Signed-off-by: Herve Codina <redacted>
Acked-by: Arnout Vandecappelle (Essensium/Mind) <redacted>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
---
 Makefile |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/Makefile b/Makefile
index 43b5ba5..d3f80c4 100644
--- a/Makefile
+++ b/Makefile
@@ -777,6 +777,7 @@ savedefconfig: $(BUILD_DIR)/buildroot-config/conf outputmakefile
 	@$(COMMON_CONFIG_ENV) $< \
 		--savedefconfig=$(if $(DEFCONFIG),$(DEFCONFIG),$(CONFIG_DIR)/defconfig) \
 		$(CONFIG_CONFIG_IN)
+	@$(SED) '/BR2_DEFCONFIG=/d' $(if $(DEFCONFIG),$(DEFCONFIG),$(CONFIG_DIR)/defconfig)
 
 .PHONY: defconfig savedefconfig
 
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help