1BSD/pi/comp

if ! -r temp mkdir temp
rmtree -fv temp
mkstr - pi_strings temp/ $*
cd temp
cpall ../*.h ../whoami .
: loop
if $1x = x goto out
if $1x = loadx goto out
echo $1:
if -r ../nofloat goto nofloatcc
cc -c -O $1
goto join
: nofloatcc
cc -c -O -f $1
: join
shift
goto loop
: out
squash *.o
mvall *.o ..
cd ..
rmtree -fv temp
version >Version.c
cc -c Version.c
ar rv lib *.o
rm *.o
if $1x != loadx exit
echo loading
shift
load -i
echo done