From 143c1430c9ff72351dd1628f1ee740ff931886be Mon Sep 17 00:00:00 2001 From: "Yann E. MORIN\"" Date: Wed, 15 Aug 2012 22:06:22 +0200 Subject: samples: add rule to dump current .config into a defconfig ... and one to restore it, of course. Reported-by: Thomas Petazzoni Signed-off-by: "Yann E. MORIN" --- kconfig/kconfig.mk | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'kconfig') diff --git a/kconfig/kconfig.mk b/kconfig/kconfig.mk index 8748287c..4cacf737 100644 --- a/kconfig/kconfig.mk +++ b/kconfig/kconfig.mk @@ -5,7 +5,7 @@ #----------------------------------------------------------- # The configurators rules -configurators = menuconfig nconfig oldconfig +configurators = menuconfig nconfig oldconfig defconfig olddefconfig PHONY += $(configurators) $(configurators): config_files @@ -27,6 +27,14 @@ oldconfig: .config @$(ECHO) " CONF $(KCONFIG_TOP)" $(SILENT)$(CONF) --silent$@ $(KCONFIG_TOP) +defconfig: .config + @$(ECHO) ' GEN $@' + $(SILENT)$(CONF) --savedefconfig=$${CONFIG-defconfig} $(KCONFIG_TOP) + +olddefconfig: + @$(ECHO) ' CONF $@' + $(SILENT)$(CONF) --defconfig=$${CONFIG-defconfig} $(KCONFIG_TOP) + # Always be silent, the stdout an be >.config extractconfig: @$(awk) 'BEGIN { dump=0; } \ @@ -50,3 +58,6 @@ help-config:: @echo ' oldconfig - Update current config using a provided .config as base' @echo ' extractconfig - Extract to stdout the configuration items from a' @echo ' build.log file piped to stdin' + @echo ' defconfig - Save current config as a mini-defconfig to $${CONFIG}' + @echo ' olddefconfig - Update config from a mini-defconfig $${CONFIG}' + @echo ' (default: $${CONFIG}=./defconfig)' -- cgit v1.2.3