#!/bin/csh -f #(ie run the cshell on this but don't read the .cshrc) echo version = 3.22 of pc 2000 July 25 echo '**********************************************' echo '* THE SUN COMPLIER IS NO LONGER AVAILBLE *****' echo '**********************************************' echo '* USING GPC by the gpcc script ***************' echo '**********************************************' gpcc $1 exit if (! $#argv == 1) then echo "usage: pc program.p" echo " OR: pc program" echo "Pascal compiler on Sun Microsystems computers" exit endif # for the /opt/SUNWspro/bin/pc compiler, # one can get help as follows: # /opt/SUNWspro/bin/pc -help | more if (`arch` == sun4) then echo -n architecture is sun4 set os = `uname -rs | cut -c1-7 | sed -e "s/ //"` echo -n on $os set name = `echo $1 | sed -e "s/\.p//"` echo program: $name if ($os == SunOS5) then ver < $name.p if (-f $name.p) then if (-f $name) then echo $name.p exists echo so we can delete $name echo REMOVING $name rm -f $name endif else echo NO SUCH PROGRAM $name\! set thestatus = 1 sound 80 laugh & exit endif # 1995 oct 19 the -Bstatic allows programs to # run on both Sparky and Kaylor # recompile if this message is seen: # ld.so.1: malign: fatal: libpc.so: can't open file: errno=2 # Killed # or # ld.so.1: /home/kaylor/toms/bin/malign: fatal: libpc.so: can't open file: errno=2 # Killed # /opt/SUNWspro/bin/pc -fast -notrace -Bstatic $name.p -o $name # the -fast option causses a Bus Error (core dumped) error which # does not show up when one does a debug run (without -fast). # It is also VERY VERY slow to compile. #Message when I ran alist.p: # Note: this program was linked with -fast or -fnonstd # and so may have produced nonstandard floating-point results. # Sun's implementation of IEEE arithmetic is discussed in # the Numerical Computation Guide. # DON'T USE THESE!!! # note: -notrace allows "Segmentation Fault (core dumped)" echo using /opt/SUNWspro/bin/pc /opt/SUNWspro/bin/pc -V -notrace -Bstatic $name.p -o $name set thestatus = $status # /opt/SUNWspro/bin/pc -Bstatic $name.p -o $name # don't do the following for the debug version: # IS this causing "Segmentation Fault (core dumped)"? Nope. /usr/local/bin/strip $name if (thestatus == 0) then sound 80 crash & else # echo 'first {'$name' done}' echo '' echo '{'$name' done}' sound 60 drip & endif else echo -n '{compiling '$name'}' ver <$name.p #pc $name.p -s -V -C -O2 -o $name /usr/ucb/pc $name.p -s -V -C -O2 -o $name & echo -n '{'$name' done}' endif else if (`arch` == sun3) then echo You would even TRY on this slow thing? endif echo $thestatus exit $thestatus