3 # fixpaths - substitute makefile variables into text files
6 $usage = "Usage: $0 [-Dstring=replacement] [[infile] ...]\n";
8 if (!defined(@ARGV)) { die ("$usage"); }
10 # read in the command line and get some definitions
11 while ($_=$ARGV[0], /^-/) {
15 if ( /-D(.*)=(.*)/ ) {
18 die ("$usage$0: error in command line arguments.\n");
21 @cmd = split(//, $ARGV[0]); $opt = $cmd[1];
22 die ("$usage$0: unknown option '-$opt'\n");
24 } # while parsing arguments
27 die ("$0: nothing to do - no substitutions listed!\n");
34 open(IN, "<$f") || die ("$0: input file $f missing!\n");