Skip to content

Commit 95edca5

Browse files
committed
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.org Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
1 parent 319e2e3 commit 95edca5

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

‎scripts/kconfig/streamline_config.pl‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -219,6 +219,13 @@ sub read_kconfig {
219219
$depends{$config} = $1;
220220
} elsif ($state eq "DEP" && /^\s*depends\s+on\s+(.*)$/) {
221221
$depends{$config} .= " " . $1;
222+
} elsif ($state eq "DEP" && /^\s*def(_(bool|tristate)|ault)\s+(\S.*)$/) {
223+
my $dep = $3;
224+
if ($dep !~ /^\s*(y|m|n)\s*$/) {
225+
$dep =~ s/.*\sif\s+//;
226+
$depends{$config} .= " " . $dep;
227+
dprint "Added default depends $dep to $config\n";
228+
}
222229

223230
# Get the configs that select this config
224231
} elsif ($state ne "NONE" && /^\s*select\s+(\S+)/) {

0 commit comments

Comments
 (0)