From patchwork Tue Aug 16 05:34:12 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnaud Lacombe X-Patchwork-Id: 1070372 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.4) with ESMTP id p7G5Ykow011995 for ; Tue, 16 Aug 2011 05:34:47 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752860Ab1HPFe2 (ORCPT ); Tue, 16 Aug 2011 01:34:28 -0400 Received: from mail-yw0-f46.google.com ([209.85.213.46]:61644 "EHLO mail-yw0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751262Ab1HPFe1 (ORCPT ); Tue, 16 Aug 2011 01:34:27 -0400 Received: by ywf7 with SMTP id 7so3567555ywf.19 for ; Mon, 15 Aug 2011 22:34:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references; bh=i5J82q8gHmmu2ozQACoULciPnQHrwrMh+XGEDqVrACM=; b=ky047LZkRlOWMD8jH8/hGHXbnm8uk+0sI2v+vAvC8Rze3YLR4UT6eyYyQQY/ZYXhBD yL9DDacn4x23VAVicS1bi1PNLG5rXgC8nfkj29pAIlZBoNACrQgiWUvRJHl0P4XL34X1 GxPSvE2sIZyks6J0tcmMpzD+OiQiIh2Vn54nI= Received: by 10.236.178.104 with SMTP id e68mr9067972yhm.23.1313472866489; Mon, 15 Aug 2011 22:34:26 -0700 (PDT) Received: from localhost.localdomain (69-165-142-232.dsl.teksavvy.com [69.165.142.232]) by mx.google.com with ESMTPS id e21sm985275yhn.77.2011.08.15.22.34.25 (version=SSLv3 cipher=OTHER); Mon, 15 Aug 2011 22:34:25 -0700 (PDT) From: Arnaud Lacombe To: Michal Marek Cc: linux-kernel@vger.kernel.org, linux-kbuild@vger.kernel.org, Arnaud Lacombe Subject: [PATCH 2/4] kbuild: reduce kbuild invasivity within kconfig Date: Tue, 16 Aug 2011 01:34:12 -0400 Message-Id: <1313472854-14426-3-git-send-email-lacombar@gmail.com> X-Mailer: git-send-email 1.7.6.153.g78432 In-Reply-To: <1313472854-14426-1-git-send-email-lacombar@gmail.com> References: <1313472854-14426-1-git-send-email-lacombar@gmail.com> Sender: linux-kbuild-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kbuild@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Tue, 16 Aug 2011 05:34:47 +0000 (UTC) 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 --- 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