URL
https://opencores.org/ocsvn/eco32/eco32/trunk
[/] [eco32/] [trunk/] [lcc/] [src/] [run.sh] - Blame information for rev 112
Go to most recent revision |
Details |
Compare with Previous |
View Log
Line No. |
Rev |
Author |
Line |
1 |
4 |
hellwig |
#!/bin/sh
|
2 |
|
|
# $Id: run.sh,v 1.11 1997/07/03 00:15:10 drh Exp $
|
3 |
|
|
# run .../target/os/tst/foo.s [ remotehost ]
|
4 |
|
|
|
5 |
|
|
# set -x
|
6 |
|
|
target=`echo $1 | awk -F/ '{ print $(NF-3) }'`
|
7 |
|
|
os=`echo $1 | awk -F/ '{ print $(NF-2) }'`
|
8 |
|
|
dir=$target/$os
|
9 |
|
|
|
10 |
|
|
case "$1" in
|
11 |
|
|
*symbolic/irix*) idir=include/mips/irix; remotehost=noexecute ;;
|
12 |
|
|
*symbolic/osf*) idir=include/alpha/osf; remotehost=noexecute ;;
|
13 |
|
|
*) idir=include/$dir; remotehost=${2-$REMOTEHOST} ;;
|
14 |
|
|
esac
|
15 |
|
|
|
16 |
|
|
if [ ! -d "$target/$os" -o ! -d "$idir" ]; then
|
17 |
|
|
echo 2>&1 $0: unknown combination '"'$target/$os'"'
|
18 |
|
|
exit 1
|
19 |
|
|
fi
|
20 |
|
|
|
21 |
|
|
C=`basename $1 .s`
|
22 |
|
|
BUILDDIR=${BUILDDIR-.} LCC="${LCC-${BUILDDIR}/lcc} -Wo-lccdir=$BUILDDIR"
|
23 |
|
|
TSTDIR=${TSTDIR-${BUILDDIR}/$dir/tst}
|
24 |
|
|
if [ ! -d $TSTDIR ]; then mkdir -p $TSTDIR; fi
|
25 |
|
|
|
26 |
|
|
echo ${BUILDDIR}/rcc$EXE -target=$target/$os $1: 1>&2
|
27 |
|
|
$LCC -S -I$idir -Ualpha -Usun -Uvax -Umips -Ux86 \
|
28 |
|
|
-Wf-errout=$TSTDIR/$C.2 -D$target -Wf-g0 \
|
29 |
|
|
-Wf-target=$target/$os -o $1 tst/$C.c
|
30 |
|
|
if [ $? != 0 ]; then remotehost=noexecute; fi
|
31 |
|
|
if [ -r $dir/tst/$C.2bk ]; then
|
32 |
|
|
diff $dir/tst/$C.2bk $TSTDIR/$C.2
|
33 |
|
|
fi
|
34 |
|
|
if [ -r $dir/tst/$C.sbk ]; then
|
35 |
|
|
if diff $dir/tst/$C.sbk $TSTDIR/$C.s; then exit 0; fi
|
36 |
|
|
fi
|
37 |
|
|
|
38 |
|
|
case "$remotehost" in
|
39 |
|
|
noexecute) exit 0 ;;
|
40 |
|
|
""|"-") $LCC -o $TSTDIR/$C$EXE $1; $TSTDIR/$C$EXE <tst/$C.0 >$TSTDIR/$C.1 ;;
|
41 |
|
|
*) rcp $1 $remotehost:
|
42 |
|
|
if expr "$remotehost" : '.*@' >/dev/null ; then
|
43 |
|
|
remotehost="`expr $remotehost : '.*@\(.*\)'` -l `expr $remotehost : '\(.*\)@'`"
|
44 |
|
|
fi
|
45 |
|
|
rsh $remotehost "cc -o $C$EXE $C.s -lm;./$C$EXE;rm -f $C$EXE $C.[so]" <tst/$C.0 >$TSTDIR/$C.1
|
46 |
|
|
;;
|
47 |
|
|
esac
|
48 |
|
|
if [ -r $dir/tst/$C.1bk ]; then
|
49 |
|
|
diff $dir/tst/$C.1bk $TSTDIR/$C.1
|
50 |
|
|
exit $?
|
51 |
|
|
fi
|
52 |
|
|
exit 0
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.