diff options
author | kay.sievers@vrfy.org <kay.sievers@vrfy.org> | 2005-03-10 17:51:43 +0100 |
---|---|---|
committer | Greg KH <gregkh@suse.de> | 2005-04-26 23:51:00 -0700 |
commit | cb948532ff3cb7edf1d2eead7a5cce9e8a1a7a97 (patch) | |
tree | 5b2fb284278ff19db0c4b71e3d7f8d79a12d7cb3 /klibc/makeklcc.pl | |
parent | 08183c4b90505866e806d308213d0a2d293b2659 (diff) |
[PATCH] klibc: version 1.0.3
Diffstat (limited to 'klibc/makeklcc.pl')
-rw-r--r-- | klibc/makeklcc.pl | 17 |
1 files changed, 5 insertions, 12 deletions
diff --git a/klibc/makeklcc.pl b/klibc/makeklcc.pl index ea3f8a8256..f8a6294db3 100644 --- a/klibc/makeklcc.pl +++ b/klibc/makeklcc.pl @@ -7,23 +7,16 @@ ($klccin, $klibcconf, $perlpath) = @ARGV; -# This should probably handle quotes and escapes... -sub string2list($) -{ - my($s) = @_; - - $s =~ s/\s+/\',\'/g; - return "(\'".$s."\')"; -} - print "#!${perlpath}\n"; open(KLIBCCONF, '<', $klibcconf) or die "$0: cannot open $klibcconf: $!\n"; while ( defined($l = <KLIBCCONF>) ) { chomp $l; - if ( $l =~ /=/ ) { - print "\$$` = \"\Q$'\E\";\n"; - print "\@$` = ", string2list("$'"), ";\n"; + if ( $l =~ /^([^=]+)\=(.*)$/ ) { + $n = $1; $s = $2; + print "\$$n = \"\Q$s\E\";\n"; + print "\@$n = qw($s);\n"; + print "\$conf{\'\L$n\E\'} = \\\$$n;\n"; } } close(KLIBCCONF); |