1#! /bin/sh 2 3LOGF=make.log 4 5CONFIG_ARGS="$@" 6 7IAM=`hostname || uname -n` 8 9#set -e 10#set -x 11 12CVO=`./config.guess` 13case "$CVO" in 14 *-*-*) ;; 15 *) echo "config.guess returned <$CVO>, which makes no sense to me." 16 exit 1 17 ;; 18esac 19 20MYNAME=`IFS=. ; set $IAM ; echo $1` 21 22case "$IAM" in 23 *.udel.edu) 24 BDIR=A.$MYNAME 25 ;; 26 *) 27 BDIR=A.$CVO 28 ;; 29esac 30 31CCSUF="" 32 33case "$CC" in 34 '') ;; 35 *) CCSUF="-$CC" 36 ;; 37esac 38 39BDIR="$BDIR$CCSUF" 40 41[ -d "$BDIR" ] || mkdir $BDIR 42[ -f "$BDIR/.buildcvo" ] || echo $CVO > $BDIR/.buildcvo 43[ -f "$BDIR/.buildhost" ] || echo $IAM > $BDIR/.buildhost 44 45cd $BDIR 46 47( 48[ -f config.status ] || ../configure $CONFIG_ARGS 49 50case "$MAKE" in 51 '') make && make check 52 ;; 53 *) $MAKE && $MAKE check 54 ;; 55esac 56) > $LOGF 2>&1 57