kconfig: unify rule of config, menuconfig, nconfig, gconfig, xconfig
Unify the similar build rules. This supports 'make build_config', which builds scripts/kconfig/conf but does not invoke it. Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
This commit is contained in:
parent
ae8da72bde
commit
f91e46b1a7
@ -3,9 +3,6 @@
|
|||||||
# Kernel configuration targets
|
# Kernel configuration targets
|
||||||
# These targets are used from top-level makefile
|
# These targets are used from top-level makefile
|
||||||
|
|
||||||
PHONY += xconfig gconfig menuconfig config localmodconfig localyesconfig \
|
|
||||||
build_menuconfig build_nconfig build_gconfig build_xconfig
|
|
||||||
|
|
||||||
ifdef KBUILD_KCONFIG
|
ifdef KBUILD_KCONFIG
|
||||||
Kconfig := $(KBUILD_KCONFIG)
|
Kconfig := $(KBUILD_KCONFIG)
|
||||||
else
|
else
|
||||||
@ -19,29 +16,24 @@ endif
|
|||||||
# We need this, in case the user has it in its environment
|
# We need this, in case the user has it in its environment
|
||||||
unexport CONFIG_
|
unexport CONFIG_
|
||||||
|
|
||||||
xconfig: $(obj)/qconf
|
config-prog := conf
|
||||||
$(Q)$< $(silent) $(Kconfig)
|
menuconfig-prog := mconf
|
||||||
|
nconfig-prog := nconf
|
||||||
|
gconfig-prog := gconf
|
||||||
|
xconfig-prog := qconf
|
||||||
|
|
||||||
gconfig: $(obj)/gconf
|
define config_rule
|
||||||
$(Q)$< $(silent) $(Kconfig)
|
PHONY += $(1)
|
||||||
|
$(1): $(obj)/$($(1)-prog)
|
||||||
|
$(Q)$$< $(silent) $(Kconfig)
|
||||||
|
|
||||||
menuconfig: $(obj)/mconf
|
PHONY += build_$(1)
|
||||||
$(Q)$< $(silent) $(Kconfig)
|
build_$(1): $(obj)/$($(1)-prog)
|
||||||
|
endef
|
||||||
|
|
||||||
config: $(obj)/conf
|
$(foreach c, config menuconfig nconfig gconfig xconfig, $(eval $(call config_rule,$(c))))
|
||||||
$(Q)$< $(silent) $(Kconfig)
|
|
||||||
|
|
||||||
nconfig: $(obj)/nconf
|
|
||||||
$(Q)$< $(silent) $(Kconfig)
|
|
||||||
|
|
||||||
build_menuconfig: $(obj)/mconf
|
|
||||||
|
|
||||||
build_nconfig: $(obj)/nconf
|
|
||||||
|
|
||||||
build_gconfig: $(obj)/gconf
|
|
||||||
|
|
||||||
build_xconfig: $(obj)/qconf
|
|
||||||
|
|
||||||
|
PHONY += localmodconfig localyesconfig
|
||||||
localyesconfig localmodconfig: $(obj)/conf
|
localyesconfig localmodconfig: $(obj)/conf
|
||||||
$(Q)$(PERL) $(srctree)/$(src)/streamline_config.pl --$@ $(srctree) $(Kconfig) > .tmp.config
|
$(Q)$(PERL) $(srctree)/$(src)/streamline_config.pl --$@ $(srctree) $(Kconfig) > .tmp.config
|
||||||
$(Q)if [ -f .config ]; then \
|
$(Q)if [ -f .config ]; then \
|
||||||
|
Loading…
x
Reference in New Issue
Block a user