summaryrefslogtreecommitdiff
blob: e86ae61ee401935ff310a733412099241308a580 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
If say LDFLAGS = "", then '' gets passed as arg to ld which borks

--- 1/makeklcc.pl	2005-03-10 00:22:03.000000000 +0200
+++ 2/makeklcc.pl	2005-03-10 01:26:51.000000000 +0200
@@ -7,24 +7,14 @@
 
 ($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 =~ /^([^=]+)\=(.*)$/ ) {
+    if ( $l =~ /^([^=]+)=(.*)$/ ) {
 	$n = $1;  $s = $2;
 	print "\$$n = \"\Q$s\E\";\n";
-	print "\@$n = ", string2list($s), ";\n";
+	print "\@$n = qw( $s );\n";
 	print "\$conf{\'\L$n\E\'} = \\\$$n;\n";
     }
 }