[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1313472854-14426-3-git-send-email-lacombar@gmail.com>
Date: Tue, 16 Aug 2011 01:34:12 -0400
From: Arnaud Lacombe <lacombar@...il.com>
To: Michal Marek <mmarek@...e.cz>
Cc: linux-kernel@...r.kernel.org, linux-kbuild@...r.kernel.org,
Arnaud Lacombe <lacombar@...il.com>
Subject: [PATCH 2/4] kbuild: reduce kbuild invasivity within kconfig
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@...il.com>
---
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
$< --$@...fconfig $(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-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists