aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2013-04-30 10:20:33 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2013-04-30 10:20:33 -0400
commit500fcbc4a9f91dfd011c9a6caec80a55e14fd338 (patch)
tree3239113045dd30013e78241e2a70801074a83a71
parent56847d857cb0c3ee78c22ce776a26f88d9ffd4d4 (diff)
parentced9cb1af1e3486cc14dca755a1b3fbadf06e90b (diff)
Merge tag 'localmodconfig-v3.10' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-kconfig
Pull localmodconfig changes from Steven Rostedt: "A bug was recently found in the make localmodconfig where it would miss dependencies of config files are include in other config files inside an if statement. Also added a debug print that helped in solving this bug." * tag 'localmodconfig-v3.10' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-kconfig: localmodconfig: Process source kconfig files as they are found localmodconfig: Add debug prints for dependencies of module configs
-rw-r--r--scripts/kconfig/streamline_config.pl26
1 files changed, 16 insertions, 10 deletions
diff --git a/scripts/kconfig/streamline_config.pl b/scripts/kconfig/streamline_config.pl
index 33689396953a..4606cdfb859d 100644
--- a/scripts/kconfig/streamline_config.pl
+++ b/scripts/kconfig/streamline_config.pl
@@ -156,7 +156,6 @@ sub read_kconfig {
156 156
157 my $state = "NONE"; 157 my $state = "NONE";
158 my $config; 158 my $config;
159 my @kconfigs;
160 159
161 my $cont = 0; 160 my $cont = 0;
162 my $line; 161 my $line;
@@ -190,7 +189,13 @@ sub read_kconfig {
190 189
191 # collect any Kconfig sources 190 # collect any Kconfig sources
192 if (/^source\s*"(.*)"/) { 191 if (/^source\s*"(.*)"/) {
193 $kconfigs[$#kconfigs+1] = $1; 192 my $kconfig = $1;
193 # prevent reading twice.
194 if (!defined($read_kconfigs{$kconfig})) {
195 $read_kconfigs{$kconfig} = 1;
196 read_kconfig($kconfig);
197 }
198 next;
194 } 199 }
195 200
196 # configs found 201 # configs found
@@ -250,14 +255,6 @@ sub read_kconfig {
250 } 255 }
251 } 256 }
252 close($kinfile); 257 close($kinfile);
253
254 # read in any configs that were found.
255 foreach my $kconfig (@kconfigs) {
256 if (!defined($read_kconfigs{$kconfig})) {
257 $read_kconfigs{$kconfig} = 1;
258 read_kconfig($kconfig);
259 }
260 }
261} 258}
262 259
263if ($kconfig) { 260if ($kconfig) {
@@ -396,6 +393,15 @@ foreach my $module (keys(%modules)) {
396 foreach my $conf (@arr) { 393 foreach my $conf (@arr) {
397 $configs{$conf} = $module; 394 $configs{$conf} = $module;
398 dprint "$conf added by direct ($module)\n"; 395 dprint "$conf added by direct ($module)\n";
396 if ($debugprint) {
397 my $c=$conf;
398 $c =~ s/^CONFIG_//;
399 if (defined($depends{$c})) {
400 dprint " deps = $depends{$c}\n";
401 } else {
402 dprint " no deps\n";
403 }
404 }
399 } 405 }
400 } else { 406 } else {
401 # Most likely, someone has a custom (binary?) module loaded. 407 # Most likely, someone has a custom (binary?) module loaded.