aboutsummaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorSteven Rostedt <srostedt@redhat.com>2010-10-28 22:13:51 -0400
committerSteven Rostedt <rostedt@goodmis.org>2010-10-29 01:07:10 -0400
commit20d190473328b90755eb2434cf2d26b73a53ef23 (patch)
treec49e7def2a87ec216144d283d4ba91883ea86192 /scripts
parentcf5a189d4a02efb3712cfb424452f4ce3ab7c4a2 (diff)
kconfig: Fix streamline_config to read multi line deps in Kconfig files
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>
Diffstat (limited to 'scripts')
-rw-r--r--scripts/kconfig/streamline_config.pl19
1 files changed, 18 insertions, 1 deletions
diff --git a/scripts/kconfig/streamline_config.pl b/scripts/kconfig/streamline_config.pl
index 883748c70d28..ebba407ac5eb 100644
--- a/scripts/kconfig/streamline_config.pl
+++ b/scripts/kconfig/streamline_config.pl
@@ -125,7 +125,6 @@ my %selects;
125my %prompts; 125my %prompts;
126my %objects; 126my %objects;
127my $var; 127my $var;
128my $cont = 0;
129my $iflevel = 0; 128my $iflevel = 0;
130my @ifdeps; 129my @ifdeps;
131 130
@@ -139,6 +138,9 @@ sub read_kconfig {
139 my $config; 138 my $config;
140 my @kconfigs; 139 my @kconfigs;
141 140
141 my $cont = 0;
142 my $line;
143
142 my $source = "$ksource/$kconfig"; 144 my $source = "$ksource/$kconfig";
143 my $last_source = ""; 145 my $last_source = "";
144 146
@@ -153,6 +155,19 @@ sub read_kconfig {
153 while (<KIN>) { 155 while (<KIN>) {
154 chomp; 156 chomp;
155 157
158 # Make sure that lines ending with \ continue
159 if ($cont) {
160 $_ = $line . " " . $_;
161 }
162
163 if (s/\\$//) {
164 $cont = 1;
165 $line = $_;
166 next;
167 }
168
169 $cont = 0;
170
156 # collect any Kconfig sources 171 # collect any Kconfig sources
157 if (/^source\s*"(.*)"/) { 172 if (/^source\s*"(.*)"/) {
158 $kconfigs[$#kconfigs+1] = $1; 173 $kconfigs[$#kconfigs+1] = $1;
@@ -230,6 +245,8 @@ if ($kconfig) {
230# Read all Makefiles to map the configs to the objects 245# Read all Makefiles to map the configs to the objects
231foreach my $makefile (@makefiles) { 246foreach my $makefile (@makefiles) {
232 247
248 my $cont = 0;
249
233 open(MIN,$makefile) || die "Can't open $makefile"; 250 open(MIN,$makefile) || die "Can't open $makefile";
234 while (<MIN>) { 251 while (<MIN>) {
235 my $objs; 252 my $objs;