blob: 5a8c5fa3570ba0f6bbb8956c329f0ea23004ce0b (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
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
|