 #this perlscript changes the lable SPATH in the makefile
 #the old projectfile is renamed to *_bak
 #call: perl project version path profectfile
 #17.08.99 Thomas Roesner


 $newpath = shift;                      # new workpath from @ARGV

 while($f = shift){                     # get each name from @ARGV

   print "Perl is changing the file ".$f."\n";

   unlink ($f.'_bak');                  # deletes old backup
   rename ($f,$f.'_bak');               # and creates a new one

   open(I,$f.'_bak') || die;            # open the old file
   open(O,">".$f) || die;               # open the new file
   $n = 0;                              # zero counter
   while(<I>)                           # read from input
   {
     $path += s/SPATH.=.*/SPATH = $newpath/;        # replace

     print O;                           # copy to outfile
   }
   close O; close I;                    # close files
}
