Skip to content

Commit

Permalink
Merge tag 'localmodconfig-v3.10' of git://git.kernel.org/pub/scm/linu…
Browse files Browse the repository at this point in the history
…x/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
  • Loading branch information
torvalds committed Apr 30, 2013
2 parents 56847d8 + ced9cb1 commit 500fcbc
Showing 1 changed file with 16 additions and 10 deletions.
26 changes: 16 additions & 10 deletions scripts/kconfig/streamline_config.pl
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,6 @@ sub read_kconfig {

my $state = "NONE";
my $config;
my @kconfigs;

my $cont = 0;
my $line;
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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) {
Expand Down Expand Up @@ -396,6 +393,15 @@ sub convert_vars {
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.
Expand Down

0 comments on commit 500fcbc

Please sign in to comment.