1985-01-18 09:59:09 +00:00
|
|
|
TMP=/usr/tmp/ego
|
|
|
|
DDUMP=$TMP.dd.$$
|
|
|
|
PDUMP=$TMP.pd.$$
|
|
|
|
PHASES=''
|
|
|
|
FLAGS=''
|
|
|
|
|
|
|
|
|
|
|
|
while :
|
|
|
|
do
|
|
|
|
case $# in
|
|
|
|
0) break ;;
|
|
|
|
esac
|
|
|
|
A="$1"
|
|
|
|
shift
|
|
|
|
case $A in
|
|
|
|
*.m|*.ma) ICARG="$ICARG $A"; continue;;
|
|
|
|
-P) OPT="$1"; shift; continue;;
|
|
|
|
-IL) PHASES="$PHASES il cf " ; continue;;
|
|
|
|
-CS) PHASES="$PHASES cs " ; continue;;
|
|
|
|
-SR) PHASES="$PHASES sr " ; continue;;
|
|
|
|
-UD) PHASES="$PHASES ud " ; continue;;
|
|
|
|
-LV) PHASES="$PHASES lv " ; continue;;
|
|
|
|
-RA) PHASES="$PHASES ra " ; continue;;
|
|
|
|
-SP) PHASES="$PHASES sp " ; continue;;
|
|
|
|
-BO) PHASES="$PHASES bo " ; continue;;
|
|
|
|
-CJ) PHASES="$PHASES cj " ; continue;;
|
|
|
|
-*) FLAGS="$FLAGS $A"; continue;;
|
|
|
|
esac
|
|
|
|
done
|
|
|
|
if test "$PHASES"
|
|
|
|
then :
|
|
|
|
else PHASES='cj bo sp '
|
|
|
|
fi
|
|
|
|
PASSES="ic cf $PHASES ca"
|
|
|
|
OUTFILES="$PDUMP $DDUMP"
|
|
|
|
c=1
|
|
|
|
if test "$ICARG"
|
|
|
|
then :
|
|
|
|
else
|
|
|
|
exit 0
|
|
|
|
fi
|
|
|
|
for i in $PASSES
|
|
|
|
do INFILES=$OUTFILES
|
|
|
|
OUTFILES="$TMP.p.$c.$$ $TMP.d.$c.$$ $TMP.l.$c.$$ $TMP.b.$c.$$"
|
|
|
|
trap "rm -f $INFILES $OUTFILES $PDUMP $DDUMP; exit 1" 1 2 15
|
|
|
|
case $i in
|
1985-02-11 10:07:47 +00:00
|
|
|
ic) if $OPT/ic $INFILES - - $OUTFILES $ICARG
|
1985-01-18 09:59:09 +00:00
|
|
|
then :
|
|
|
|
else exit 1
|
|
|
|
fi ;;
|
1985-02-11 10:07:47 +00:00
|
|
|
ca) if $OPT/ca $INFILES $PDUMP $DDUMP - -
|
1985-01-18 09:59:09 +00:00
|
|
|
then
|
|
|
|
rm -f $INFILES $PDUMP $DDUMP
|
|
|
|
else
|
|
|
|
rm -f $INFILES $PDUMP $DDUMP
|
|
|
|
exit 1
|
|
|
|
fi;;
|
1985-02-11 10:07:47 +00:00
|
|
|
*) if $OPT/$i $INFILES $OUTFILES $FLAGS
|
1985-01-18 09:59:09 +00:00
|
|
|
then
|
|
|
|
rm -f $INFILES
|
|
|
|
else
|
|
|
|
rm -f $INFILES
|
|
|
|
exit 1
|
|
|
|
fi ;;
|
|
|
|
esac
|
|
|
|
c=`expr $c + 1`
|
|
|
|
done
|
|
|
|
exit 0
|