@@ -235,8 +235,8 @@ ifeq ($(ARCH),m68knommu)
hdr-arch := m68k
endif
-KCONFIG_CONFIG ?= .config
-export KCONFIG_CONFIG
+KBUILD_CONFIG ?= .config
+export KBUILD_CONFIG
# SHELL used by kbuild
CONFIG_SHELL := $(shell if [ -x "$$BASH" ]; then echo $$BASH; \
@@ -484,6 +484,10 @@ ifeq ($(config-targets),1)
include $(srctree)/arch/$(SRCARCH)/Makefile
export KBUILD_DEFCONFIG KBUILD_KCONFIG
+# Prepare Kconfig environment
+KCONFIG_CONFIG = $(KBUILD_CONFIG)
+export KCONFIG_CONFIG
+
config: scripts_basic outputmakefile FORCE
$(Q)mkdir -p include/linux include/config
$(Q)$(MAKE) $(build)=scripts/kconfig $@
@@ -154,5 +154,5 @@ CFLAGS_font.o := -Dstatic=
$(obj)/font.c: $(FONTC)
$(call cmd,shipped)
-$(obj)/vmlinux.lds: $(obj)/vmlinux.lds.in arch/arm/boot/Makefile $(KCONFIG_CONFIG)
+$(obj)/vmlinux.lds: $(obj)/vmlinux.lds.in arch/arm/boot/Makefile $(KBUILD_CONFIG)
@sed "$(SEDFLAGS)" < $< > $@
@@ -63,6 +63,6 @@ ZTEXTADDR := 0x03000000
ZBSSADDR := ALIGN(4)
SEDFLAGS_lds = s/TEXT_START/$(ZTEXTADDR)/;s/BSS_START/$(ZBSSADDR)/
-$(obj)/vmlinux.lds: $(obj)/vmlinux.lds.in arch/unicore32/boot/Makefile $(KCONFIG_CONFIG)
+$(obj)/vmlinux.lds: $(obj)/vmlinux.lds.in arch/unicore32/boot/Makefile $(KBUILD_CONFIG)
@sed "$(SEDFLAGS_lds)" < $< > $@
@@ -11,6 +11,9 @@ else
Kconfig := Kconfig
endif
+KCONFIG_CONFIG ?= .config
+export KCONFIG_CONFIG
+
xconfig: $(obj)/qconf
$< $(Kconfig)
Refine the Kbuild interface to expose it's own variable to architecture Makefile's and prepare Kconfig environment prior to any %config invocation. Signed-off-by: Arnaud Lacombe <lacombar@gmail.com> --- Makefile | 8 ++++++-- arch/arm/boot/compressed/Makefile | 2 +- arch/unicore32/boot/compressed/Makefile | 2 +- scripts/kconfig/Makefile | 3 +++ 4 files changed, 11 insertions(+), 4 deletions(-)