aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2005-12-28 18:10:26 -0800
committerH. Peter Anvin <hpa@zytor.com>2005-12-28 18:10:26 -0800
commit6580e8b5782cc300b1fea1dfcc25cd282da57bf0 (patch)
treef20b5e1b41843b7ee579a0bb7da902e15041eb59
parent66401f9a3e7b6b49008f50f0956aa82a5b491980 (diff)
downloadklibc-6580e8b5782cc300b1fea1dfcc25cd282da57bf0.tar.gz
Make more robust; don't rely on qw()klibc-1.1.13
-rwxr-xr-xklcc/makeklcc.pl11
1 files changed, 9 insertions, 2 deletions
diff --git a/klcc/makeklcc.pl b/klcc/makeklcc.pl
index 74045955fdcd7..1d61a36bc5b29 100755
--- a/klcc/makeklcc.pl
+++ b/klcc/makeklcc.pl
@@ -31,7 +31,7 @@ print "#!${perlpath}\n";
open(KLIBCCONF, '<', $klibcconf) or die "$0: cannot open $klibcconf: $!\n";
while ( defined($l = <KLIBCCONF>) ) {
chomp $l;
- if ( $l =~ /^([^=]+)\=(.*)$/ ) {
+ if ( $l =~ /^([^=]+)\=\s*(.*)$/ ) {
$n = $1; $s = $2;
if ( $n eq 'CC' || $n eq 'LD' || $n eq 'STRIP' ) {
@@ -41,8 +41,15 @@ while ( defined($l = <KLIBCCONF>) ) {
}
print "\$$n = \"\Q$s\E\";\n";
- print "\@$n = qw($s);\n";
print "\$conf{\'\L$n\E\'} = \\\$$n;\n";
+
+ print "\@$n = ("; $sep = '';
+ while ( $s =~ /^\s*(\S+)/ ) {
+ print $sep, "\"\Q$1\E\"";
+ $sep = ', ';
+ $s = $';
+ }
+ print ");\n";
}
}
close(KLIBCCONF);