#!/bin/csh # FCOMP -- Compile a Fortran or SPP file. This is a kludge used to workaround # a bug in the DS3100/MIPS Fortran compiler, wherein the parser goes completely # bonkers on large files. When this occurs it is necessary to break the file # up into pieces and compile them separately to workaround the problem. #set echo set root = $1:r set xfile = ${root}.x set ffile = ${root}.f set ofile = ${root}.o set DIR = zzz.fcomp if ($1 == $xfile) then xc -f $1 endif if (-e $DIR) then rm -rf $DIR endif mkdir $DIR cat $ffile | (cd $DIR; fsplit) (cd $DIR; f77 -c -O -G 0 *.f; ld -r *.o -o ../zzz.fcomp.o) mv zzz.fcomp.o $ofile rm -rf $DIR if ($1 == $xfile) then rm -f $ffile endif