@@ -238,6 +238,9 @@ endif
KBUILD_CONFIG ?= .config
export KBUILD_CONFIG
+KBUILD_KCONFIG ?= Kconfig
+export KBUILD_KCONFIG
+
# SHELL used by kbuild
CONFIG_SHELL := $(shell if [ -x "$$BASH" ]; then echo $$BASH; \
else if [ -x /bin/bash ]; then echo /bin/bash; \
@@ -482,11 +485,12 @@ ifeq ($(config-targets),1)
# KBUILD_DEFCONFIG may point out an alternative default configuration
# used for 'make defconfig'
include $(srctree)/arch/$(SRCARCH)/Makefile
-export KBUILD_DEFCONFIG KBUILD_KCONFIG
# Prepare Kconfig environment
+Kconfig = $(KBUILD_KCONFIG)
KCONFIG_CONFIG = $(KBUILD_CONFIG)
-export KCONFIG_CONFIG
+KCONFIG_DEFCONFIG = $(KBUILD_DEFCONFIG)
+export Kconfig KCONFIG_CONFIG KCONFIG_DEFCONFIG
config: scripts_basic outputmakefile FORCE
$(Q)mkdir -p include/linux include/config
@@ -5,13 +5,9 @@
PHONY += oldconfig xconfig gconfig menuconfig config silentoldconfig update-po-config \
localmodconfig localyesconfig
-ifdef KBUILD_KCONFIG
-Kconfig := $(KBUILD_KCONFIG)
-else
-Kconfig := Kconfig
-endif
-
+Kconfig ?= Kconfig
KCONFIG_CONFIG ?= .config
+KCONFIG_DEFCONFIG ?=
export KCONFIG_CONFIG
xconfig: $(obj)/qconf
@@ -113,11 +109,11 @@ savedefconfig: $(obj)/conf
$< --$@=defconfig $(Kconfig)
defconfig: $(obj)/conf
-ifeq ($(KBUILD_DEFCONFIG),)
+ifeq ($(KCONFIG_DEFCONFIG),)
$< --defconfig $(Kconfig)
else
- @echo "*** Default configuration is based on '$(KBUILD_DEFCONFIG)'"
- $(Q)$< --defconfig=arch/$(SRCARCH)/configs/$(KBUILD_DEFCONFIG) $(Kconfig)
+ @echo "*** Default configuration is based on '$(KCONFIG_DEFCONFIG)'"
+ $(Q)$< --defconfig=arch/$(SRCARCH)/configs/$(KCONFIG_DEFCONFIG) $(Kconfig)
endif
%_defconfig: $(obj)/conf
Introduce `Kconfig' and `KCONFIG_DEFCONFIG' as a Kconfig's interface to kbuild. These variable are set in the top-level Makefile, which remove reference to KBUILD_ prefixed variable within Kconfig makefile. Signed-off-by: Arnaud Lacombe <lacombar@gmail.com> --- Makefile | 8 ++++++-- scripts/kconfig/Makefile | 14 +++++--------- 2 files changed, 11 insertions(+), 11 deletions(-)