summaryrefslogtreecommitdiff
path: root/kconfig/kconfig.mk
diff options
context:
space:
mode:
authorYann E. MORIN" <yann.morin.1998@free.fr>2012-08-15 20:06:22 (GMT)
committerYann E. MORIN" <yann.morin.1998@free.fr>2012-08-15 20:06:22 (GMT)
commit143c1430c9ff72351dd1628f1ee740ff931886be (patch)
tree31091466e7676c7c048cd32ca7a3fe9c5c0ad7e8 /kconfig/kconfig.mk
parent3a0575282ffab9ee3698d9ccd648dd37b3910121 (diff)
samples: add rule to dump current .config into a defconfig
... and one to restore it, of course. Reported-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Diffstat (limited to 'kconfig/kconfig.mk')
-rw-r--r--kconfig/kconfig.mk13
1 files changed, 12 insertions, 1 deletions
diff --git a/kconfig/kconfig.mk b/kconfig/kconfig.mk
index 8748287..4cacf73 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)'