From patchwork Tue Aug 16 05:34:11 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnaud Lacombe X-Patchwork-Id: 1070432 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter2.kernel.org (8.14.4/8.14.4) with ESMTP id p7G5ZRZ1003892 for ; Tue, 16 Aug 2011 05:35:27 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752531Ab1HPFfK (ORCPT ); Tue, 16 Aug 2011 01:35:10 -0400 Received: from mail-gx0-f174.google.com ([209.85.161.174]:47112 "EHLO mail-gx0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752028Ab1HPFeZ (ORCPT ); Tue, 16 Aug 2011 01:34:25 -0400 Received: by gxk21 with SMTP id 21so3607034gxk.19 for ; Mon, 15 Aug 2011 22:34:25 -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=fuVc9Av2BVD61n6+fisdAhIul60c+buYGkOyXsb97ys=; b=WdGd6di/LI9TMVr/lOkB12JPLSzs68GMjm8jkMKJkP2WfoDv2eqGWhe9aKx3RBtiLr qy7fvTvsbSWaRY4GRc0EZehhkJeyROLDkMg7v7RR5sPVlTCeImwc7BbXdjrveHCIzK+r UjXO4txpZNjPlZG+FNeWPW3mfIqSW1ArPOPHc= Received: by 10.236.181.74 with SMTP id k50mr14952884yhm.208.1313472864974; Mon, 15 Aug 2011 22:34:24 -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.23 (version=SSLv3 cipher=OTHER); Mon, 15 Aug 2011 22:34:24 -0700 (PDT) From: Arnaud Lacombe To: Michal Marek Cc: linux-kernel@vger.kernel.org, linux-kbuild@vger.kernel.org, Arnaud Lacombe Subject: [PATCH 1/4] kbuild: introduce KBUILD_CONFIG; unexpose KCONFIG_CONFIG Date: Tue, 16 Aug 2011 01:34:11 -0400 Message-Id: <1313472854-14426-2-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 (demeter2.kernel.org [140.211.167.43]); Tue, 16 Aug 2011 05:35:27 +0000 (UTC) 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 --- 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(-) diff --git a/Makefile b/Makefile index b4ca4e1..26798a4 100644 --- a/Makefile +++ b/Makefile @@ -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 $@ diff --git a/arch/arm/boot/compressed/Makefile b/arch/arm/boot/compressed/Makefile index 0c74a6f..1891c0c 100644 --- a/arch/arm/boot/compressed/Makefile +++ b/arch/arm/boot/compressed/Makefile @@ -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)" < $< > $@ diff --git a/arch/unicore32/boot/compressed/Makefile b/arch/unicore32/boot/compressed/Makefile index b0954a2..90a9841 100644 --- a/arch/unicore32/boot/compressed/Makefile +++ b/arch/unicore32/boot/compressed/Makefile @@ -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)" < $< > $@ diff --git a/scripts/kconfig/Makefile b/scripts/kconfig/Makefile index 82d2eb2..3fa5a65 100644 --- a/scripts/kconfig/Makefile +++ b/scripts/kconfig/Makefile @@ -11,6 +11,9 @@ else Kconfig := Kconfig endif +KCONFIG_CONFIG ?= .config +export KCONFIG_CONFIG + xconfig: $(obj)/qconf $< $(Kconfig)