summaryrefslogtreecommitdiffstats
path: root/scripts/kconfig
diff options
context:
space:
mode:
authorSteven Rostedt (Red Hat) <rostedt@goodmis.org>2013-12-18 12:35:20 -0500
committerSteven Rostedt <rostedt@goodmis.org>2013-12-20 17:02:44 -0500
commit95edca5c523c4b404dd60baa0a1bea0e4c38fd72 (patch)
tree7172ab3dff7dc0a3751d5c1e8c31599930422837 /scripts/kconfig
parent319e2e3f63c348a9b66db4667efa73178e18b17d (diff)
downloadtalos-obmc-linux-95edca5c523c4b404dd60baa0a1bea0e4c38fd72.tar.gz
talos-obmc-linux-95edca5c523c4b404dd60baa0a1bea0e4c38fd72.zip
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>
Diffstat (limited to 'scripts/kconfig')
-rw-r--r--scripts/kconfig/streamline_config.pl7
1 files changed, 7 insertions, 0 deletions
diff --git a/scripts/kconfig/streamline_config.pl b/scripts/kconfig/streamline_config.pl
index 4606cdfb859d..31331723e810 100644
--- a/scripts/kconfig/streamline_config.pl
+++ b/scripts/kconfig/streamline_config.pl
@@ -219,6 +219,13 @@ sub read_kconfig {
$depends{$config} = $1;
} elsif ($state eq "DEP" && /^\s*depends\s+on\s+(.*)$/) {
$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
} elsif ($state ne "NONE" && /^\s*select\s+(\S+)/) {
OpenPOWER on IntegriCloud