Commit 20d19047 authored by Steven Rostedt's avatar Steven Rostedt Committed by Steven Rostedt

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: default avatarSteven Rostedt <rostedt@goodmis.org>
parent cf5a189d
...@@ -125,7 +125,6 @@ my %selects; ...@@ -125,7 +125,6 @@ my %selects;
my %prompts; my %prompts;
my %objects; my %objects;
my $var; my $var;
my $cont = 0;
my $iflevel = 0; my $iflevel = 0;
my @ifdeps; my @ifdeps;
...@@ -139,6 +138,9 @@ sub read_kconfig { ...@@ -139,6 +138,9 @@ sub read_kconfig {
my $config; my $config;
my @kconfigs; my @kconfigs;
my $cont = 0;
my $line;
my $source = "$ksource/$kconfig"; my $source = "$ksource/$kconfig";
my $last_source = ""; my $last_source = "";
...@@ -153,6 +155,19 @@ sub read_kconfig { ...@@ -153,6 +155,19 @@ sub read_kconfig {
while (<KIN>) { while (<KIN>) {
chomp; chomp;
# Make sure that lines ending with \ continue
if ($cont) {
$_ = $line . " " . $_;
}
if (s/\\$//) {
$cont = 1;
$line = $_;
next;
}
$cont = 0;
# collect any Kconfig sources # collect any Kconfig sources
if (/^source\s*"(.*)"/) { if (/^source\s*"(.*)"/) {
$kconfigs[$#kconfigs+1] = $1; $kconfigs[$#kconfigs+1] = $1;
...@@ -230,6 +245,8 @@ if ($kconfig) { ...@@ -230,6 +245,8 @@ if ($kconfig) {
# Read all Makefiles to map the configs to the objects # Read all Makefiles to map the configs to the objects
foreach my $makefile (@makefiles) { foreach my $makefile (@makefiles) {
my $cont = 0;
open(MIN,$makefile) || die "Can't open $makefile"; open(MIN,$makefile) || die "Can't open $makefile";
while (<MIN>) { while (<MIN>) {
my $objs; my $objs;
......
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