summaryrefslogtreecommitdiff
path: root/kconfig/kconfig.mk
diff options
context:
space:
mode:
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)'