Commit 1cba0c30 authored by Michal Marek's avatar Michal Marek

kconfig: Simplify Makefile

Use a single rule for targets handled directly by the conf program.
Signed-off-by: default avatarMichal Marek <mmarek@suse.cz>
parent 63a91033
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
# Kernel configuration targets # Kernel configuration targets
# These targets are used from top-level makefile # These targets are used from top-level makefile
PHONY += oldconfig xconfig gconfig menuconfig config silentoldconfig update-po-config \ PHONY += xconfig gconfig menuconfig config silentoldconfig update-po-config \
localmodconfig localyesconfig localmodconfig localyesconfig
ifdef KBUILD_KCONFIG ifdef KBUILD_KCONFIG
...@@ -29,9 +29,6 @@ config: $(obj)/conf ...@@ -29,9 +29,6 @@ config: $(obj)/conf
nconfig: $(obj)/nconf nconfig: $(obj)/nconf
$< $(Kconfig) $< $(Kconfig)
oldconfig: $(obj)/conf
$< --$@ $(Kconfig)
silentoldconfig: $(obj)/conf silentoldconfig: $(obj)/conf
$(Q)mkdir -p include/config include/generated $(Q)mkdir -p include/config include/generated
$< --$@ $(Kconfig) $< --$@ $(Kconfig)
...@@ -74,21 +71,20 @@ update-po-config: $(obj)/kxgettext $(obj)/gconf.glade.h ...@@ -74,21 +71,20 @@ update-po-config: $(obj)/kxgettext $(obj)/gconf.glade.h
--output $(obj)/linux.pot --output $(obj)/linux.pot
$(Q)rm -f $(obj)/config.pot $(Q)rm -f $(obj)/config.pot
PHONY += allnoconfig allyesconfig allmodconfig alldefconfig randconfig # These targets map 1:1 to the commandline options of 'conf'
simple-targets := oldconfig allnoconfig allyesconfig allmodconfig \
alldefconfig randconfig listnewconfig olddefconfig
PHONY += $(simple-targets)
allnoconfig allyesconfig allmodconfig alldefconfig randconfig: $(obj)/conf $(simple-targets): $(obj)/conf
$< --$@ $(Kconfig) $< --$@ $(Kconfig)
PHONY += listnewconfig olddefconfig oldnoconfig savedefconfig defconfig PHONY += oldnoconfig savedefconfig defconfig
listnewconfig olddefconfig: $(obj)/conf
$< --$@ $(Kconfig)
# oldnoconfig is an alias of olddefconfig, because people already are dependent # oldnoconfig is an alias of olddefconfig, because people already are dependent
# on its behavior(sets new symbols to their default value but not 'n') with the # on its behavior(sets new symbols to their default value but not 'n') with the
# counter-intuitive name. # counter-intuitive name.
oldnoconfig: $(obj)/conf oldnoconfig: olddefconfig
$< --olddefconfig $(Kconfig)
savedefconfig: $(obj)/conf savedefconfig: $(obj)/conf
$< --$@=defconfig $(Kconfig) $< --$@=defconfig $(Kconfig)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment