From patchwork Fri Oct 29 05:43:14 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steven Rostedt X-Patchwork-Id: 289342 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id o9T5jF1c012992 for ; Fri, 29 Oct 2010 05:45:15 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754216Ab0J2For (ORCPT ); Fri, 29 Oct 2010 01:44:47 -0400 Received: from hrndva-omtalb.mail.rr.com ([71.74.56.122]:63323 "EHLO hrndva-omtalb.mail.rr.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752205Ab0J2FoZ (ORCPT ); Fri, 29 Oct 2010 01:44:25 -0400 X-Authority-Analysis: v=1.1 cv=kXGwZUU/u1JTMRv8Axk4W0omja+vfTT+sGlOkodD8F8= c=1 sm=0 a=yHcU_4g1GYsA:10 a=bbbx4UPp9XUA:10 a=OPBmh+XkhLl+Enan7BmTLg==:17 a=20KFwNOVAAAA:8 a=meVymXHHAAAA:8 a=BUQqRvzF8HAIV3N57woA:9 a=rfnkYTT9Wx1mkmA7JXo861euM9YA:4 a=jEp0ucaQiEUA:10 a=jeBq3FmKZ4MA:10 a=OPBmh+XkhLl+Enan7BmTLg==:117 X-Cloudmark-Score: 0 X-Originating-IP: 67.242.120.143 Received: from [67.242.120.143] ([67.242.120.143:46389] helo=gandalf.stny.rr.com) by hrndva-oedge02.mail.rr.com (envelope-from ) (ecelerity 2.2.3.46 r()) with ESMTP id 99/50-14897-83F5ACC4; Fri, 29 Oct 2010 05:44:25 +0000 Received: from rostedt by gandalf.stny.rr.com with local (Exim 4.72) (envelope-from ) id 1PBhlI-0004w3-DH; Fri, 29 Oct 2010 01:44:24 -0400 Message-Id: <20101029054424.291908153@goodmis.org> User-Agent: quilt/0.48-1 Date: Fri, 29 Oct 2010 01:43:14 -0400 From: Steven Rostedt To: linux-kernel@vger.kernel.org Cc: Linus Torvalds , Andrew Morton , Michal Marek , linux-kbuild@vger.kernel.org Subject: [PATCH 4/5] [PATCH 4/5] kconfig: Fix streamline_config to read multi line deps in Kconfig files References: <20101029054310.790179545@goodmis.org> Content-Disposition: inline; filename=0004-kconfig-Fix-streamline_config-to-read-multi-line-dep.patch 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.3 (demeter1.kernel.org [140.211.167.41]); Fri, 29 Oct 2010 05:45:15 +0000 (UTC) diff --git a/scripts/kconfig/streamline_config.pl b/scripts/kconfig/streamline_config.pl index 883748c..ebba407 100644 --- a/scripts/kconfig/streamline_config.pl +++ b/scripts/kconfig/streamline_config.pl @@ -125,7 +125,6 @@ my %selects; my %prompts; my %objects; my $var; -my $cont = 0; my $iflevel = 0; my @ifdeps; @@ -139,6 +138,9 @@ sub read_kconfig { my $config; my @kconfigs; + my $cont = 0; + my $line; + my $source = "$ksource/$kconfig"; my $last_source = ""; @@ -153,6 +155,19 @@ sub read_kconfig { while () { chomp; + # Make sure that lines ending with \ continue + if ($cont) { + $_ = $line . " " . $_; + } + + if (s/\\$//) { + $cont = 1; + $line = $_; + next; + } + + $cont = 0; + # collect any Kconfig sources if (/^source\s*"(.*)"/) { $kconfigs[$#kconfigs+1] = $1; @@ -230,6 +245,8 @@ if ($kconfig) { # Read all Makefiles to map the configs to the objects foreach my $makefile (@makefiles) { + my $cont = 0; + open(MIN,$makefile) || die "Can't open $makefile"; while () { my $objs;