aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--scripts/kconfig/streamline_config.pl25
1 files changed, 12 insertions, 13 deletions
diff --git a/scripts/kconfig/streamline_config.pl b/scripts/kconfig/streamline_config.pl
index ec7afce4c88d..42ef5ea5ebdc 100644
--- a/scripts/kconfig/streamline_config.pl
+++ b/scripts/kconfig/streamline_config.pl
@@ -253,17 +253,22 @@ if ($kconfig) {
253# Read all Makefiles to map the configs to the objects 253# Read all Makefiles to map the configs to the objects
254foreach my $makefile (@makefiles) { 254foreach my $makefile (@makefiles) {
255 255
256 my $cont = 0; 256 my $line = "";
257 257
258 open(MIN,$makefile) || die "Can't open $makefile"; 258 open(MIN,$makefile) || die "Can't open $makefile";
259 while (<MIN>) { 259 while (<MIN>) {
260 my $objs; 260 # if this line ends with a backslash, continue
261 261 chomp;
262 # is this a line after a line with a backslash? 262 if (/^(.*)\\$/) {
263 if ($cont && /(\S.*)$/) { 263 $line .= $1;
264 $objs = $1; 264 next;
265 } 265 }
266 $cont = 0; 266
267 $line .= $_;
268 $_ = $line;
269 $line = "";
270
271 my $objs;
267 272
268 # collect objects after obj-$(CONFIG_FOO_BAR) 273 # collect objects after obj-$(CONFIG_FOO_BAR)
269 if (/obj-\$\((CONFIG_[^\)]*)\)\s*[+:]?=\s*(.*)/) { 274 if (/obj-\$\((CONFIG_[^\)]*)\)\s*[+:]?=\s*(.*)/) {
@@ -271,12 +276,6 @@ foreach my $makefile (@makefiles) {
271 $objs = $2; 276 $objs = $2;
272 } 277 }
273 if (defined($objs)) { 278 if (defined($objs)) {
274 # test if the line ends with a backslash
275 if ($objs =~ m,(.*)\\$,) {
276 $objs = $1;
277 $cont = 1;
278 }
279
280 foreach my $obj (split /\s+/,$objs) { 279 foreach my $obj (split /\s+/,$objs) {
281 $obj =~ s/-/_/g; 280 $obj =~ s/-/_/g;
282 if ($obj =~ /(.*)\.o$/) { 281 if ($obj =~ /(.*)\.o$/) {