1#! /bin/sh 2 3LOGF=make.log 4IAM=`hostname || uname -n` 5 6case "$1" in 7 0.*) 8 SIG=$1 9 shift 10 CONFIG_ARGS="$@" 11 KEY=`sed -e q < .buildkey` 12 case "$SIG" in 13 $KEY) ;; 14 *) 15 echo "Wrong directory for build on host $IAM" 16 echo "This is <`pwd`>" 17 echo "SIG is <$SIG>" 18 echo "KEY is <$KEY>" 19 exit 1 20 ;; 21 esac 22 ;; 23 *) 24 CONFIG_ARGS="$@" 25 ;; 26esac 27 28#set -e 29#set -x 30 31CVO=`./config.guess` 32case "$CVO" in 33 *-*-*) ;; 34 *) echo "config.guess returned <$CVO>, which makes no sense to me." 35 exit 1 36 ;; 37esac 38 39MYNAME=`IFS=. ; set $IAM ; echo $1` 40 41case "$IAM" in 42 *.udel.edu) 43 BDIR=A.$MYNAME 44 ;; 45 *) 46 BDIR=A.$CVO 47 ;; 48esac 49 50KEYSUF="" 51 52case "$CONFIG_ARGS" in 53 *--with-crypto=autokey*) 54 KEYSUF="-autokey" 55 ;; 56 *--without-crypto*) 57 KEYSUF="-noopenssl" 58 ;; 59esac 60 61CCSUF="" 62 63case "$CC" in 64 '') ;; 65 *) CCSUF="-$CC" 66 ;; 67esac 68 69BDIR="$BDIR$KEYSUF$CCSUF" 70 71[ -d "$BDIR" ] || mkdir $BDIR 72[ -f "$BDIR/.buildcvo" ] || echo $CVO > $BDIR/.buildcvo 73[ -f "$BDIR/.buildhost" ] || echo $IAM > $BDIR/.buildhost 74 75cd $BDIR 76 77( 78[ -f config.status ] || ../configure $CONFIG_ARGS 79 80./config.status 81 82case "$MAKE" in 83 '') make && make check 84 ;; 85 *) $MAKE && $MAKE check 86 ;; 87esac 88) > $LOGF 2>&1 89