diff options
author | H. Peter Anvin <hpa@zytor.com> | 2005-12-28 18:10:26 -0800 |
---|---|---|
committer | H. Peter Anvin <hpa@zytor.com> | 2005-12-28 18:10:26 -0800 |
commit | 6580e8b5782cc300b1fea1dfcc25cd282da57bf0 (patch) | |
tree | f20b5e1b41843b7ee579a0bb7da902e15041eb59 | |
parent | 66401f9a3e7b6b49008f50f0956aa82a5b491980 (diff) | |
download | klibc-6580e8b5782cc300b1fea1dfcc25cd282da57bf0.tar.gz |
Make more robust; don't rely on qw()klibc-1.1.13
-rwxr-xr-x | klcc/makeklcc.pl | 11 |
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); |