3 # fixpaths - substitute makefile variables into text files
6 $usage = "Usage: $0 [-x<file dot-suffix>] [-Dstring=replacement] [[infile] ...]\n";
10 if (!defined(@ARGV)) { die ("$usage"); }
12 # read in the command line and get some definitions
13 while ($_=$ARGV[0], /^-/) {
17 if ( /-D(.*)=(.*)/ ) {
19 } elsif ( /-x\s*(\w+)/ ) {
22 die ("$usage$0: error in command line arguments.\n");
25 die ("$usage$0: unknown option '-".$ARGV[0][1]."'\n");
27 } # while parsing arguments
30 die ("$0: nothing to do - no substitutions listed!\n");
38 open(IN, "<$f") || die ("$0: input file $f missing!\n");
39 if (open(OUT, ">$of")) {