3 # Combine klibc.config, klcc.in to produce a klcc script
5 # Usage: makeklcc klcc.in klibc.config perlpath
8 ($klccin, $klibcconf, $perlpath) = @ARGV;
10 print "#!${perlpath}\n";
12 open(KLIBCCONF, '<', $klibcconf) or die "$0: cannot open $klibcconf: $!\n";
13 while ( defined($l = <KLIBCCONF>) ) {
15 if ( $l =~ /^([^=]+)\=(.*)$/ ) {
17 print "\$$n = \"\Q$s\E\";\n";
18 print "\@$n = qw($s);\n";
19 print "\$conf{\'\L$n\E\'} = \\\$$n;\n";
24 open(KLCCIN, '<', $klccin) or die "$0: cannot open $klccin: $!\n";
25 while ( defined($l = <KLCCIN>) ) {