]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
Merge tag 'localmodconfig-v3.10' of git://git.kernel.org/pub/scm/linux/kernel/git...
authorLinus Torvalds <torvalds@linux-foundation.org>
Tue, 30 Apr 2013 14:20:33 +0000 (07:20 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Tue, 30 Apr 2013 14:20:33 +0000 (07:20 -0700)
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

scripts/kconfig/streamline_config.pl

index 33689396953a7e46d5152df204ddb802ec4b2a39..4606cdfb859d59ac71a8e6d353a33d6f2a7110a0 100644 (file)
@@ -156,7 +156,6 @@ sub read_kconfig {
 
     my $state = "NONE";
     my $config;
-    my @kconfigs;
 
     my $cont = 0;
     my $line;
@@ -190,7 +189,13 @@ sub read_kconfig {
 
        # collect any Kconfig sources
        if (/^source\s*"(.*)"/) {
-           $kconfigs[$#kconfigs+1] = $1;
+           my $kconfig = $1;
+           # prevent reading twice.
+           if (!defined($read_kconfigs{$kconfig})) {
+               $read_kconfigs{$kconfig} = 1;
+               read_kconfig($kconfig);
+           }
+           next;
        }
 
        # configs found
@@ -250,14 +255,6 @@ sub read_kconfig {
        }
     }
     close($kinfile);
-
-    # read in any configs that were found.
-    foreach my $kconfig (@kconfigs) {
-       if (!defined($read_kconfigs{$kconfig})) {
-           $read_kconfigs{$kconfig} = 1;
-           read_kconfig($kconfig);
-       }
-    }
 }
 
 if ($kconfig) {
@@ -396,6 +393,15 @@ foreach my $module (keys(%modules)) {
        foreach my $conf (@arr) {
            $configs{$conf} = $module;
            dprint "$conf added by direct ($module)\n";
+           if ($debugprint) {
+               my $c=$conf;
+               $c =~ s/^CONFIG_//;
+               if (defined($depends{$c})) {
+                   dprint " deps = $depends{$c}\n";
+               } else {
+                   dprint " no deps\n";
+               }
+           }
        }
     } else {
        # Most likely, someone has a custom (binary?) module loaded.