diff options
author | Yann E. MORIN" <yann.morin.1998@free.fr> | 2012-08-15 22:06:22 +0200 |
---|---|---|
committer | Yann E. MORIN" <yann.morin.1998@free.fr> | 2012-08-15 22:06:22 +0200 |
commit | 143c1430c9ff72351dd1628f1ee740ff931886be (patch) | |
tree | 31091466e7676c7c048cd32ca7a3fe9c5c0ad7e8 /kconfig | |
parent | 3a0575282ffab9ee3698d9ccd648dd37b3910121 (diff) | |
download | crosstool-ng-143c1430c9ff72351dd1628f1ee740ff931886be.tar.gz crosstool-ng-143c1430c9ff72351dd1628f1ee740ff931886be.tar.bz2 crosstool-ng-143c1430c9ff72351dd1628f1ee740ff931886be.zip |
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')
-rw-r--r-- | kconfig/kconfig.mk | 13 |
1 files changed, 12 insertions, 1 deletions
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)' |