History

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

Linus Torvalds committed 13 years ago

Commit 500fcbc2 parents 56847d8 ced9cb11 file · +16 −10Browse files

Unified · Split

scripts/kconfig/streamline_config.pl+16−10
@@ -156,7 +156,6 @@ sub read_kconfig { · 155 unmodified lines
156156
157157 my $state = "NONE";
158158 my $config;
159− my @kconfigs;
160159
161160 my $cont = 0;
162161 my $line;
@@ -190,7 +189,13 @@ sub read_kconfig { · 27 unmodified lines
190189
191190 # collect any Kconfig sources
192191 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;
194199 }
195200
196201 # configs found
@@ -250,14 +255,6 @@ sub read_kconfig { · 53 unmodified lines
250255 }
251256 }
252257 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− }
261258 }
262259
263260 if ($kconfig) {
@@ -396,6 +393,15 @@ foreach my $module (keys(%modules)) { · 132 unmodified lines
396393 foreach my $conf (@arr) {
397394 $configs{$conf} = $module;
398395 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+ }
399405 }
400406 } else {
401407 # Most likely, someone has a custom (binary?) module loaded.