From patchwork Sat Sep 17 01:49:18 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Stultz X-Patchwork-Id: 4151 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id B3E1423F54 for ; Sat, 17 Sep 2011 01:49:29 +0000 (UTC) Received: from mail-fx0-f52.google.com (mail-fx0-f52.google.com [209.85.161.52]) by fiordland.canonical.com (Postfix) with ESMTP id A8C32A18068 for ; Sat, 17 Sep 2011 01:49:29 +0000 (UTC) Received: by mail-fx0-f52.google.com with SMTP id 23so3223336fxe.11 for ; Fri, 16 Sep 2011 18:49:29 -0700 (PDT) Received: by 10.223.61.66 with SMTP id s2mr198714fah.27.1316224169447; Fri, 16 Sep 2011 18:49:29 -0700 (PDT) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.152.11.8 with SMTP id m8cs148333lab; Fri, 16 Sep 2011 18:49:29 -0700 (PDT) Received: by 10.236.190.200 with SMTP id e48mr299921yhn.59.1316224168027; Fri, 16 Sep 2011 18:49:28 -0700 (PDT) Received: from e6.ny.us.ibm.com (e6.ny.us.ibm.com. [32.97.182.146]) by mx.google.com with ESMTPS id c2si10565505yhe.62.2011.09.16.18.49.27 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 16 Sep 2011 18:49:28 -0700 (PDT) Received-SPF: pass (google.com: domain of jstultz@us.ibm.com designates 32.97.182.146 as permitted sender) client-ip=32.97.182.146; Authentication-Results: mx.google.com; spf=pass (google.com: domain of jstultz@us.ibm.com designates 32.97.182.146 as permitted sender) smtp.mail=jstultz@us.ibm.com Received: from d01relay05.pok.ibm.com (d01relay05.pok.ibm.com [9.56.227.237]) by e6.ny.us.ibm.com (8.14.4/8.13.1) with ESMTP id p8H1PGiC029242; Fri, 16 Sep 2011 21:25:16 -0400 Received: from d01av02.pok.ibm.com (d01av02.pok.ibm.com [9.56.224.216]) by d01relay05.pok.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id p8H1nQ5t213732; Fri, 16 Sep 2011 21:49:26 -0400 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 p8H1nPwQ002810; Fri, 16 Sep 2011 22:49:26 -0300 Received: from 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 p8H1nP1Q002786; Fri, 16 Sep 2011 22:49:25 -0300 Received: by kernel.beaverton.ibm.com (Postfix, from userid 1056) id 8F09F1E750E; Fri, 16 Sep 2011 18:49:24 -0700 (PDT) From: John Stultz To: lkml Cc: John Stultz , gthelen@google.com, tartler@cs.fau.de, Dmitry Fink , Darren Hart , Eric B Munson , Bruce Ashfield , Michal Marek , linux-kbuild@vger.kernel.org Subject: [PATCH 1/2] kconfig: Add make olddefconfig Date: Fri, 16 Sep 2011 18:49:18 -0700 Message-Id: <1316224159-3556-2-git-send-email-john.stultz@linaro.org> X-Mailer: git-send-email 1.7.3.2.146.gca209 In-Reply-To: <1316224159-3556-1-git-send-email-john.stultz@linaro.org> References: <1316224159-3556-1-git-send-email-john.stultz@linaro.org> This adds an "olddefconfig" build target, which updates a .config file filling any any absent symbols with the Kconfig default value (note: not the architecture defconfig value). Similar to oldnoconfig, this option is useful for build systems when dealing with config fragments. CC: gthelen@google.com CC: tartler@cs.fau.de CC: Dmitry Fink CC: Darren Hart CC: Eric B Munson CC: Bruce Ashfield CC: Michal Marek CC: linux-kbuild@vger.kernel.org Signed-off-by: John Stultz --- scripts/kconfig/Makefile | 2 +- scripts/kconfig/conf.c | 4 ++++ 2 files changed, 5 insertions(+), 1 deletions(-) diff --git a/scripts/kconfig/Makefile b/scripts/kconfig/Makefile index 82d2eb2..c238f3e 100644 --- a/scripts/kconfig/Makefile +++ b/scripts/kconfig/Makefile @@ -103,7 +103,7 @@ allnoconfig allyesconfig allmodconfig alldefconfig randconfig: $(obj)/conf PHONY += listnewconfig oldnoconfig savedefconfig defconfig -listnewconfig oldnoconfig: $(obj)/conf +listnewconfig oldnoconfig olddefconfig: $(obj)/conf $< --$@ $(Kconfig) savedefconfig: $(obj)/conf diff --git a/scripts/kconfig/conf.c b/scripts/kconfig/conf.c index f208f90..ab7bc68 100644 --- a/scripts/kconfig/conf.c +++ b/scripts/kconfig/conf.c @@ -33,6 +33,7 @@ enum input_mode { savedefconfig, listnewconfig, oldnoconfig, + olddefconfig, } input_mode = oldaskconfig; static int indent = 1; @@ -455,6 +456,7 @@ static struct option long_opts[] = { {"randconfig", no_argument, NULL, randconfig}, {"listnewconfig", no_argument, NULL, listnewconfig}, {"oldnoconfig", no_argument, NULL, oldnoconfig}, + {"olddefconfig", no_argument, NULL, olddefconfig}, {NULL, 0, NULL, 0} }; @@ -566,6 +568,7 @@ int main(int ac, char **av) case oldconfig: case listnewconfig: case oldnoconfig: + case olddefconfig: conf_read(NULL); break; case allnoconfig: @@ -624,6 +627,7 @@ int main(int ac, char **av) conf_set_all_new_symbols(def_random); break; case defconfig: + case olddefconfig: conf_set_all_new_symbols(def_default); break; case savedefconfig: