From patchwork Wed Mar 9 02:32:36 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Stultz X-Patchwork-Id: 449 Return-Path: Delivered-To: unknown Received: from imap.gmail.com (74.125.159.109) by localhost6.localdomain6 with IMAP4-SSL; 08 Jun 2011 14:42:44 -0000 Delivered-To: patches@linaro.org Received: by 10.224.60.68 with SMTP id o4cs45641qah; Tue, 8 Mar 2011 18:33:01 -0800 (PST) Received: by 10.42.139.197 with SMTP id h5mr7434425icu.243.1299637981496; Tue, 08 Mar 2011 18:33:01 -0800 (PST) Received: from e2.ny.us.ibm.com (e2.ny.us.ibm.com [32.97.182.142]) by mx.google.com with ESMTPS id 37si3529702ibi.81.2011.03.08.18.33.00 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 08 Mar 2011 18:33:00 -0800 (PST) Received-SPF: pass (google.com: domain of jstultz@us.ibm.com designates 32.97.182.142 as permitted sender) client-ip=32.97.182.142; Authentication-Results: mx.google.com; spf=pass (google.com: domain of jstultz@us.ibm.com designates 32.97.182.142 as permitted sender) smtp.mail=jstultz@us.ibm.com Received: from d01dlp02.pok.ibm.com (d01dlp02.pok.ibm.com [9.56.224.85]) by e2.ny.us.ibm.com (8.14.4/8.13.1) with ESMTP id p292EZdI009543; Tue, 8 Mar 2011 21:14:35 -0500 Received: from d01relay07.pok.ibm.com (d01relay07.pok.ibm.com [9.56.227.147]) by d01dlp02.pok.ibm.com (Postfix) with ESMTP id A197E6E803C; Tue, 8 Mar 2011 21:32:59 -0500 (EST) Received: from d01av02.pok.ibm.com (d01av02.pok.ibm.com [9.56.224.216]) by d01relay07.pok.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id p292WwPM2248870; Tue, 8 Mar 2011 21:32:58 -0500 Received: from d01av02.pok.ibm.com (loopback [127.0.0.1]) by d01av02.pok.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id p292WvdG019694; Tue, 8 Mar 2011 23:32:57 -0300 Received: from kernel.beaverton.ibm.com (kernel.beaverton.ibm.com [9.47.67.96]) by d01av02.pok.ibm.com (8.14.4/8.13.1/NCO v10.0 AVin) with ESMTP id p292WvBx019634; Tue, 8 Mar 2011 23:32:57 -0300 Received: by kernel.beaverton.ibm.com (Postfix, from userid 1056) id EDB4D1E750F; Tue, 8 Mar 2011 18:32:56 -0800 (PST) From: John Stultz To: linaro-dev@lists.linaro.org Cc: Stephen Rothwell , Grant Likely , Jason Hui , patches@linaro.org, John Stultz Subject: [PATCH 02/12] kbuild: Enable building defconfigs from Kconfig files Date: Tue, 8 Mar 2011 18:32:36 -0800 Message-Id: <1299637966-18458-3-git-send-email-john.stultz@linaro.org> X-Mailer: git-send-email 1.7.3.2.146.gca209 In-Reply-To: <1299637966-18458-1-git-send-email-john.stultz@linaro.org> References: <1299637966-18458-1-git-send-email-john.stultz@linaro.org> X-Content-Scanned: Fidelis XPS MAILER From: Stephen Rothwell After this change, doing a "make xxx_defconfig" will check first for a file called arch//configs/Kconfig.xxx and use that to generate the .config (effectively starting from an allnoconfig). If that file doesn't exist, it will use arch//configs/xxx_defconfig as now. CC: Grant Likely CC: Jason Hui CC: patches@linaro.org Signed-off-by: Stephen Rothwell Signed-off-by: John Stultz --- scripts/kconfig/Makefile | 14 +++++++++++++- 1 files changed, 13 insertions(+), 1 deletions(-) diff --git a/scripts/kconfig/Makefile b/scripts/kconfig/Makefile index 368ae30..f1ef231 100644 --- a/scripts/kconfig/Makefile +++ b/scripts/kconfig/Makefile @@ -116,9 +116,21 @@ else $(Q)$< --defconfig=arch/$(SRCARCH)/configs/$(KBUILD_DEFCONFIG) $(Kconfig) endif -%_defconfig: $(obj)/conf +configs_dir := $(srctree)/arch/$(SRCARCH)/configs +# We check a level of sub directories because arch/powerpc +# has its defconfig files arranged that way +old_defconfigs := $(patsubst $(configs_dir)/%,%,\ + $(wildcard $(configs_dir)/*_defconfig) \ + $(wildcard $(configs_dir)/*/*_defconfig)) +defconfigs := $(patsubst $(configs_dir)/Kconfig.%,%_defconfig,\ + $(wildcard $(configs_dir)/Kconfig.*)) + +$(old_defconfigs): %_defconfig: $(obj)/conf $(Q)$< --defconfig=arch/$(SRCARCH)/configs/$@ $(Kconfig) +$(defconfigs): %_defconfig: $(obj)/conf + $(Q)$< -n arch/$(SRCARCH)/configs/Kconfig.$* + # Help text used by make help help: @echo ' config - Update current config utilising a line-oriented program'