aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/kconfig/Makefile
diff options
context:
space:
mode:
authorSam Ravnborg <sam@ravnborg.org>2010-07-31 17:35:34 -0400
committerMichal Marek <mmarek@suse.cz>2010-08-03 07:49:32 -0400
commit7cf3d73b4360e91b14326632ab1aeda4cb26308d (patch)
tree547bc52c631c9fb99ecd5c4be5ba25610505397a /scripts/kconfig/Makefile
parent49192f266ffa187bd7adaf5c2d881f85bd53e0ed (diff)
kconfig: add savedefconfig
savedefconfig will save a minimal config to a file named "defconfig". The config symbols are saved in the same order as they appear in the menu structure so it should be possible to map them to the relevant menus if desired. The implementation was tested against several minimal configs for arm which was created using brute-force. There was one regression related to default numbers which had their valid range further limited by another symbol. Sample: config FOO int "foo" default 4 config BAR int "bar" range 0 FOO If FOO is set to 3 then BAR cannot take a value higher than 3. But the current implementation will set BAR equal to 4. This is seldomly used and the final configuration is OK, and the fix was non-trivial. So it was documented in the code and left as is. Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Acked-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Michal Marek <mmarek@suse.cz>
Diffstat (limited to 'scripts/kconfig/Makefile')
-rw-r--r--scripts/kconfig/Makefile6
1 files changed, 5 insertions, 1 deletions
diff --git a/scripts/kconfig/Makefile b/scripts/kconfig/Makefile
index 72973591c0f1..c0e459e2b014 100644
--- a/scripts/kconfig/Makefile
+++ b/scripts/kconfig/Makefile
@@ -90,11 +90,14 @@ PHONY += allnoconfig allyesconfig allmodconfig alldefconfig randconfig
90allnoconfig allyesconfig allmodconfig alldefconfig randconfig: $(obj)/conf 90allnoconfig allyesconfig allmodconfig alldefconfig randconfig: $(obj)/conf
91 $< --$@ $(Kconfig) 91 $< --$@ $(Kconfig)
92 92
93PHONY += listnewconfig oldnoconfig defconfig 93PHONY += listnewconfig oldnoconfig savedefconfig defconfig
94 94
95listnewconfig oldnoconfig: $(obj)/conf 95listnewconfig oldnoconfig: $(obj)/conf
96 $< --$@ $(Kconfig) 96 $< --$@ $(Kconfig)
97 97
98savedefconfig: $(obj)/conf
99 $< --$@=defconfig $(Kconfig)
100
98defconfig: $(obj)/conf 101defconfig: $(obj)/conf
99ifeq ($(KBUILD_DEFCONFIG),) 102ifeq ($(KBUILD_DEFCONFIG),)
100 $< --defconfig $(Kconfig) 103 $< --defconfig $(Kconfig)
@@ -118,6 +121,7 @@ help:
118 @echo ' localyesconfig - Update current config converting local mods to core' 121 @echo ' localyesconfig - Update current config converting local mods to core'
119 @echo ' silentoldconfig - Same as oldconfig, but quietly, additionally update deps' 122 @echo ' silentoldconfig - Same as oldconfig, but quietly, additionally update deps'
120 @echo ' defconfig - New config with default from ARCH supplied defconfig' 123 @echo ' defconfig - New config with default from ARCH supplied defconfig'
124 @echo ' savedefconfig - Save current config as ./defconfig (minimal config)'
121 @echo ' allnoconfig - New config where all options are answered with no' 125 @echo ' allnoconfig - New config where all options are answered with no'
122 @echo ' allyesconfig - New config where all options are accepted with yes' 126 @echo ' allyesconfig - New config where all options are accepted with yes'
123 @echo ' allmodconfig - New config selecting modules when possible' 127 @echo ' allmodconfig - New config selecting modules when possible'