From: Steven Rostedt <rostedt@goodmis.org>
To: linux-kernel@vger.kernel.org
Cc: Linus Torvalds <torvalds@linux-foundation.org>,
Andrew Morton <akpm@linux-foundation.org>,
Michal Marek <mmarek@suse.cz>,
linux-kbuild@vger.kernel.org
Subject: [PATCH 4/5] [PATCH 4/5] kconfig: Fix streamline_config to read multi line deps in Kconfig files
Date: Fri, 29 Oct 2010 01:43:14 -0400 [thread overview]
Message-ID: <20101029054424.291908153@goodmis.org> (raw)
In-Reply-To: 20101029054310.790179545@goodmis.org
[-- Attachment #1: 0004-kconfig-Fix-streamline_config-to-read-multi-line-dep.patch --]
[-- Type: text/plain, Size: 1754 bytes --]
From: Steven Rostedt <srostedt@redhat.com>
I noticed that some Kconfig files have multi line dependencies
that continue with a backslash. Those dependencies on the next
line will be missed by streamline_config.
For example:
config CS89x0
tristate "CS89x0 support"
depends on NET_ETHERNET && (ISA || EISA || MACH_IXDP2351 \
|| ARCH_IXDP2X01 || MACH_MX31ADS)
The "|| ARCH_IXDP2X01 || MACH_MX31ADS)" will not be processed.
This patch adds code to handle this case.
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
---
scripts/kconfig/streamline_config.pl | 19 ++++++++++++++++++-
1 files changed, 18 insertions(+), 1 deletions(-)
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 (<KIN>) {
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 (<MIN>) {
my $objs;
--
1.7.1
next prev parent reply other threads:[~2010-10-29 5:44 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-10-29 5:43 [PATCH 0/5] [GIT PULL] kconfig: Fixes to make localmodconfig Steven Rostedt
2010-10-29 5:43 ` [PATCH 1/5] [PATCH 1/5] kconfig: Make localmodconfig handle environment variables Steven Rostedt
2010-10-30 0:26 ` Arnaud Lacombe
2010-10-30 1:27 ` Steven Rostedt
2010-10-31 22:05 ` Arnaud Lacombe
2010-11-09 0:49 ` Steven Rostedt
2010-11-25 15:45 ` Michal Marek
2010-11-25 16:21 ` Arnaud Lacombe
2010-11-25 16:37 ` Michal Marek
2010-10-29 5:43 ` [PATCH 2/5] [PATCH 2/5] kconfig: Fix variable name typo %prompts in streamline_config.pl Steven Rostedt
2010-10-29 5:43 ` [PATCH 3/5] [PATCH 3/5] kconfig: Fix missing declaration of variable $dir " Steven Rostedt
2010-10-29 5:43 ` Steven Rostedt [this message]
2010-10-29 5:43 ` [PATCH 5/5] [PATCH 5/5] kconfig: Have streamline_config process menuconfigs too Steven Rostedt
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20101029054424.291908153@goodmis.org \
--to=rostedt@goodmis.org \
--cc=akpm@linux-foundation.org \
--cc=linux-kbuild@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mmarek@suse.cz \
--cc=torvalds@linux-foundation.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).