Annotation of researchv10no/cmd/lcc/gen2/run, revision 1.1.1.1

1.1       root        1: #!/bin/sh
                      2: # ../run target os test [ remotehost ]
                      3: 
                      4: # set -x
                      5: target=$1 os=$2 remotehost=${4-$REMOTEHOST}
                      6: 
                      7: cd tst
                      8: if [ ! -r "../../../include/${target}_$os" ]; then
                      9:        echo 2>&1 $0: unknown target-system combination '"'$target-$os'"'
                     10: fi
                     11: case "$target-$os" in
                     12: mips-ultrix)   TARGET=mipsel ;;
                     13: mc-next)       TARGET=next ;;
                     14: *)             TARGET=$target ;;
                     15: esac
                     16: 
                     17: echo $HOST-$HOSTOS/rcc $target-$os $3: 1>&2
                     18: lcc -N -S -B../../$HOST-$HOSTOS/ -I../../../include/${target}_$os -Usun -Uvax -Umips \
                     19:        -D$target -Wf-g0 -Wftarget=$TARGET ../../../tst/$3.c 2>$3.2
                     20: if [ $? != 0 ]; then remotehost=noexecute; fi
                     21: diff ../../../tst/$3.2 $3.2
                     22: if [ ! -r $3.s.bak ]; then
                     23:        mv $3.s $3.s.bak
                     24:        cp $3.s.bak $3.s
                     25: else
                     26:        if diff $3.s.bak $3.s; then exit 0; fi
                     27: fi
                     28: 
                     29: case "$remotehost" in
                     30: noexecute)     exit 0 ;;
                     31: ""|"-")        lcc -o $3 $3.s -lm; ./$3 <../../../tst/$3.0 >$3.1 ;;
                     32: *)     rcp $3.s $remotehost:
                     33:        if expr "$remotehost" : '.*@' >/dev/null ; then
                     34:                remotehost="`expr $remotehost : '.*@\(.*\)'` -l `expr $remotehost : '\(.*\)@'`"
                     35:        fi
                     36:        rsh $remotehost "cc -o $3 $3.s -ll -lm;./$3;rm $3 $3.[so]" <../../../tst/$3.0 >$3.1
                     37:        ;;
                     38: esac
                     39: if [ ! -r $3.1.bak ]; then
                     40:        mv $3.1 $3.1.bak
                     41:        cp $3.1.bak $3.1
                     42:        exit 0
                     43: fi
                     44: diff $3.1.bak $3.1
                     45: exit $?

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.