Commit 95edca5c authored by Steven Rostedt (Red Hat)'s avatar Steven Rostedt (Red Hat) Committed by Steven Rostedt

localmodconfig: Add config depends by default settings

Currently localmodconfig will miss dependencies from the default option.
For example:

config FOO
	default y if BAR || ZOO

If FOO is needed for a module and is set to '=m', and so are BAR or ZOO,
localmodconfig will not see that BOO or ZOO are also needed for the foo
module, and will incorrectly disable them.

Link: http://lkml.kernel.org/r/20131218175137.162937350@goodmis.orgSigned-off-by: default avatarSteven Rostedt <rostedt@goodmis.org>
parent 319e2e3f
...@@ -219,6 +219,13 @@ sub read_kconfig { ...@@ -219,6 +219,13 @@ sub read_kconfig {
$depends{$config} = $1; $depends{$config} = $1;
} elsif ($state eq "DEP" && /^\s*depends\s+on\s+(.*)$/) { } elsif ($state eq "DEP" && /^\s*depends\s+on\s+(.*)$/) {
$depends{$config} .= " " . $1; $depends{$config} .= " " . $1;
} elsif ($state eq "DEP" && /^\s*def(_(bool|tristate)|ault)\s+(\S.*)$/) {
my $dep = $3;
if ($dep !~ /^\s*(y|m|n)\s*$/) {
$dep =~ s/.*\sif\s+//;
$depends{$config} .= " " . $dep;
dprint "Added default depends $dep to $config\n";
}
# Get the configs that select this config # Get the configs that select this config
} elsif ($state ne "NONE" && /^\s*select\s+(\S+)/) { } elsif ($state ne "NONE" && /^\s*select\s+(\S+)/) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment