[PATCH 2/4] kbuild: reduce kbuild invasivity within kconfig

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxx>
---
 Makefile                 |    8 ++++++--
 scripts/kconfig/Makefile |   14 +++++---------
 2 files changed, 11 insertions(+), 11 deletions(-)

diff --git a/Makefile b/Makefile
index 26798a4..e7b576e 100644
--- a/Makefile
+++ b/Makefile
@@ -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
diff --git a/scripts/kconfig/Makefile b/scripts/kconfig/Makefile
index 3fa5a65..dabb4f1 100644
--- a/scripts/kconfig/Makefile
+++ b/scripts/kconfig/Makefile
@@ -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
-- 
1.7.6.153.g78432

--
To unsubscribe from this list: send the line "unsubscribe linux-kbuild" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux&nblp;USB Development]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite Secrets]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux