summaryrefslogtreecommitdiff
path: root/scripts/kconfig/streamline_config.pl
diff options
context:
space:
mode:
authorSteven Rostedt <srostedt@redhat.com>2010-10-28 22:13:51 -0400
committerSteven Rostedt <rostedt@goodmis.org>2010-10-29 01:07:10 -0400
commit20d190473328b90755eb2434cf2d26b73a53ef23 (patch)
treec49e7def2a87ec216144d283d4ba91883ea86192 /scripts/kconfig/streamline_config.pl
parentcf5a189d4a02efb3712cfb424452f4ce3ab7c4a2 (diff)
kconfig: Fix streamline_config to read multi line deps in Kconfig files
I noticed that some Kconfig files have multi line dependencies that continue with a backslash. Those dependencies on the next line will be missed by streamline_config. For example: config CS89x0 tristate "CS89x0 support" depends on NET_ETHERNET && (ISA || EISA || MACH_IXDP2351 \ || ARCH_IXDP2X01 || MACH_MX31ADS) The "|| ARCH_IXDP2X01 || MACH_MX31ADS)" will not be processed. This patch adds code to handle this case. Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Diffstat (limited to 'scripts/kconfig/streamline_config.pl')
-rw-r--r--scripts/kconfig/streamline_config.pl19
1 files changed, 18 insertions, 1 deletions
diff --git a/scripts/kconfig/streamline_config.pl b/scripts/kconfig/streamline_config.pl
index 883748c70d28..ebba407ac5eb 100644
--- a/scripts/kconfig/streamline_config.pl
+++ b/scripts/kconfig/streamline_config.pl
@@ -125,7 +125,6 @@ my %selects;
my %prompts;
my %objects;
my $var;
-my $cont = 0;
my $iflevel = 0;
my @ifdeps;
@@ -139,6 +138,9 @@ sub read_kconfig {
my $config;
my @kconfigs;
+ my $cont = 0;
+ my $line;
+
my $source = "$ksource/$kconfig";
my $last_source = "";
@@ -153,6 +155,19 @@ sub read_kconfig {
while (<KIN>) {
chomp;
+ # Make sure that lines ending with \ continue
+ if ($cont) {
+ $_ = $line . " " . $_;
+ }
+
+ if (s/\\$//) {
+ $cont = 1;
+ $line = $_;
+ next;
+ }
+
+ $cont = 0;
+
# collect any Kconfig sources
if (/^source\s*"(.*)"/) {
$kconfigs[$#kconfigs+1] = $1;
@@ -230,6 +245,8 @@ if ($kconfig) {
# Read all Makefiles to map the configs to the objects
foreach my $makefile (@makefiles) {
+ my $cont = 0;
+
open(MIN,$makefile) || die "Can't open $makefile";
while (<MIN>) {
my $objs;