Added -t flag to keep temporaries around
This commit is contained in:
parent
4e4d3290d4
commit
ab62dda2fc
2 changed files with 19 additions and 5 deletions
|
@ -7,7 +7,7 @@ SHARE=../share
|
|||
LDFLAGS=-i
|
||||
CPPFLAGS=-DVERBOSE -DNOTCOMPACT
|
||||
CFLAGS=$(CPPFLAGS) -O
|
||||
LINTFLAGS=-hbac
|
||||
LINTFLAGS=-hbu
|
||||
|
||||
all:
|
||||
|
||||
|
|
|
@ -5,6 +5,7 @@ PHASES=''
|
|||
FLAGS=''
|
||||
LEVEL=xxx
|
||||
EM=$1
|
||||
KEEPTEMPS=no
|
||||
shift
|
||||
|
||||
|
||||
|
@ -28,6 +29,7 @@ do
|
|||
-BO) PHASES="$PHASES bo " ; continue;;
|
||||
-CJ) PHASES="$PHASES cj " ; continue;;
|
||||
-O*) LEVEL=$A ; continue;;
|
||||
-t) KEEPTEMPS=yes ; continue;;
|
||||
-*) FLAGS="$FLAGS $A"; continue;;
|
||||
esac
|
||||
done
|
||||
|
@ -54,7 +56,10 @@ for i in $PASSES
|
|||
do INFILES=$OUTFILES
|
||||
OUTFILES="$TMP.p.$c.$$ $TMP.d.$c.$$ $TMP.l.$c.$$ $TMP.b.$c.$$"
|
||||
FILES="$FILES $OUTFILES"
|
||||
trap "rm -f $FILES; exit 1" 0 1 2 15
|
||||
if [ $KEEPTEMPS = no ]
|
||||
then
|
||||
trap "rm -f $FILES; exit 1" 0 1 2 15
|
||||
fi
|
||||
case $i in
|
||||
ic) $OPT/ic $INFILES - - $OUTFILES $ICARG || exit 1
|
||||
;;
|
||||
|
@ -64,14 +69,23 @@ do INFILES=$OUTFILES
|
|||
$OPT/ca $INFILES $PDUMP $DDUMP - - | $EM/lib/em_opt2 > $TMPOPT || exit 1
|
||||
ICARG=$TMPOPT
|
||||
OUTFILES="$PDUMP $DDUMP"
|
||||
rm -f $INFILES $PDUMP $DDUMP
|
||||
if [ $KEEPTEMPS = no ]
|
||||
then
|
||||
rm -f $INFILES $PDUMP $DDUMP
|
||||
fi
|
||||
;;
|
||||
*) $OPT/$i $INFILES $OUTFILES $FLAGS || exit 1
|
||||
rm -f $INFILES
|
||||
if [ $KEEPTEMPS = no ]
|
||||
then
|
||||
rm -f $INFILES
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
c=`expr $c + 1`
|
||||
done
|
||||
rm -f $FILES
|
||||
if [ $KEEPTEMPS = no ]
|
||||
then
|
||||
rm -f $FILES
|
||||
fi
|
||||
trap 0
|
||||
exit 0
|
||||
|
|
Loading…
Reference in a new issue