git.openpandora.org
/
pandora-kernel.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
kconfig/streamline-config.pl: Simplify backslash line concatination
[pandora-kernel.git]
/
scripts
/
kconfig
/
streamline_config.pl
diff --git
a/scripts/kconfig/streamline_config.pl
b/scripts/kconfig/streamline_config.pl
index
ec7afce
..
42ef5ea
100644
(file)
--- a/
scripts/kconfig/streamline_config.pl
+++ b/
scripts/kconfig/streamline_config.pl
@@
-253,17
+253,22
@@
if ($kconfig) {
# Read all Makefiles to map the configs to the objects
foreach my $makefile (@makefiles) {
# Read all Makefiles to map the configs to the objects
foreach my $makefile (@makefiles) {
- my $
cont = 0
;
+ my $
line = ""
;
open(MIN,$makefile) || die "Can't open $makefile";
while (<MIN>) {
open(MIN,$makefile) || die "Can't open $makefile";
while (<MIN>) {
- my $objs;
-
- # is this a line after a line with a backslash?
- if ($cont && /(\S.*)$/) {
-
$objs = $1
;
+ # if this line ends with a backslash, continue
+ chomp;
+ if (/^(.*)\\$/) {
+ $line .= $1;
+
next
;
}
}
- $cont = 0;
+
+ $line .= $_;
+ $_ = $line;
+ $line = "";
+
+ my $objs;
# collect objects after obj-$(CONFIG_FOO_BAR)
if (/obj-\$\((CONFIG_[^\)]*)\)\s*[+:]?=\s*(.*)/) {
# collect objects after obj-$(CONFIG_FOO_BAR)
if (/obj-\$\((CONFIG_[^\)]*)\)\s*[+:]?=\s*(.*)/) {
@@
-271,12
+276,6
@@
foreach my $makefile (@makefiles) {
$objs = $2;
}
if (defined($objs)) {
$objs = $2;
}
if (defined($objs)) {
- # test if the line ends with a backslash
- if ($objs =~ m,(.*)\\$,) {
- $objs = $1;
- $cont = 1;
- }
-
foreach my $obj (split /\s+/,$objs) {
$obj =~ s/-/_/g;
if ($obj =~ /(.*)\.o$/) {
foreach my $obj (split /\s+/,$objs) {
$obj =~ s/-/_/g;
if ($obj =~ /(.*)\.o$/) {