build revision 82498
154359Sroberto#! /bin/sh 254359Sroberto 354359SrobertoLOGF=make.log 482498SrobertoIAM=`hostname || uname -n` 554359Sroberto 682498Srobertocase "$1" in 782498Sroberto 0.*) 882498Sroberto SIG=$1 982498Sroberto shift 1082498Sroberto CONFIG_ARGS="$@" 1182498Sroberto KEY=`sed -e q < .buildkey` 1282498Sroberto case "$SIG" in 1382498Sroberto $KEY) ;; 1482498Sroberto *) 1582498Sroberto echo "Wrong directory for build on host $IAM" 1682498Sroberto exit 1 1782498Sroberto ;; 1882498Sroberto esac 1982498Sroberto ;; 2082498Sroberto *) 2182498Sroberto CONFIG_ARGS="$@" 2282498Sroberto ;; 2382498Srobertoesac 2454359Sroberto 2554359Sroberto#set -e 2654359Sroberto#set -x 2754359Sroberto 2854359SrobertoCVO=`./config.guess` 2954359Srobertocase "$CVO" in 3054359Sroberto *-*-*) ;; 3154359Sroberto *) echo "config.guess returned <$CVO>, which makes no sense to me." 3254359Sroberto exit 1 3354359Sroberto ;; 3454359Srobertoesac 3554359Sroberto 3654359SrobertoMYNAME=`IFS=. ; set $IAM ; echo $1` 3754359Sroberto 3854359Srobertocase "$IAM" in 3954359Sroberto *.udel.edu) 4054359Sroberto BDIR=A.$MYNAME 4154359Sroberto ;; 4254359Sroberto *) 4354359Sroberto BDIR=A.$CVO 4454359Sroberto ;; 4554359Srobertoesac 4654359Sroberto 4782498SrobertoKEYSUF="" 4882498Sroberto 4982498Srobertocase "$CONFIG_ARGS" in 5082498Sroberto *--with-crypto=autokey*) 5182498Sroberto KEYSUF="-autokey" 5282498Sroberto ;; 5382498Sroberto *--without-crypto*) 5482498Sroberto [ -d rsaref2 ] && KEYSUF="-norsaref" 5582498Sroberto ;; 5682498Srobertoesac 5782498Sroberto 5854359SrobertoCCSUF="" 5954359Sroberto 6054359Srobertocase "$CC" in 6154359Sroberto '') ;; 6254359Sroberto *) CCSUF="-$CC" 6354359Sroberto ;; 6454359Srobertoesac 6554359Sroberto 6682498SrobertoBDIR="$BDIR$KEYSUF$CCSUF" 6754359Sroberto 6854359Sroberto[ -d "$BDIR" ] || mkdir $BDIR 6954359Sroberto[ -f "$BDIR/.buildcvo" ] || echo $CVO > $BDIR/.buildcvo 7054359Sroberto[ -f "$BDIR/.buildhost" ] || echo $IAM > $BDIR/.buildhost 7154359Sroberto 7254359Srobertocd $BDIR 7354359Sroberto 7454359Sroberto( 7554359Sroberto[ -f config.status ] || ../configure $CONFIG_ARGS 7654359Sroberto 7782498Sroberto./config.status 7882498Sroberto 7954359Srobertocase "$MAKE" in 8054359Sroberto '') make && make check 8154359Sroberto ;; 8254359Sroberto *) $MAKE && $MAKE check 8354359Sroberto ;; 8454359Srobertoesac 8556746Sroberto) > $LOGF 2>&1 86