diff options
author | Joe Hunkeler <jhunkeler@gmail.com> | 2015-08-11 16:51:37 -0400 |
---|---|---|
committer | Joe Hunkeler <jhunkeler@gmail.com> | 2015-08-11 16:51:37 -0400 |
commit | 40e5a5811c6ffce9b0974e93cdd927cbcf60c157 (patch) | |
tree | 4464880c571602d54f6ae114729bf62a89518057 /noao/lib/FC.mips | |
download | iraf-osx-40e5a5811c6ffce9b0974e93cdd927cbcf60c157.tar.gz |
Repatch (from linux) of OSX IRAF
Diffstat (limited to 'noao/lib/FC.mips')
-rwxr-xr-x | noao/lib/FC.mips | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/noao/lib/FC.mips b/noao/lib/FC.mips new file mode 100755 index 00000000..5a8c5fa3 --- /dev/null +++ b/noao/lib/FC.mips @@ -0,0 +1,32 @@ +#!/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 |