build revision 132451
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" 16132451Sroberto echo "This is <`pwd`>" 17132451Sroberto echo "SIG is <$SIG>" 18132451Sroberto echo "KEY is <$KEY>" 1982498Sroberto exit 1 2082498Sroberto ;; 2182498Sroberto esac 2282498Sroberto ;; 2382498Sroberto *) 2482498Sroberto CONFIG_ARGS="$@" 2582498Sroberto ;; 2682498Srobertoesac 2754359Sroberto 2854359Sroberto#set -e 2954359Sroberto#set -x 3054359Sroberto 3154359SrobertoCVO=`./config.guess` 3254359Srobertocase "$CVO" in 3354359Sroberto *-*-*) ;; 3454359Sroberto *) echo "config.guess returned <$CVO>, which makes no sense to me." 3554359Sroberto exit 1 3654359Sroberto ;; 3754359Srobertoesac 3854359Sroberto 3954359SrobertoMYNAME=`IFS=. ; set $IAM ; echo $1` 4054359Sroberto 4154359Srobertocase "$IAM" in 4254359Sroberto *.udel.edu) 4354359Sroberto BDIR=A.$MYNAME 4454359Sroberto ;; 4554359Sroberto *) 4654359Sroberto BDIR=A.$CVO 4754359Sroberto ;; 4854359Srobertoesac 4954359Sroberto 5082498SrobertoKEYSUF="" 5182498Sroberto 5282498Srobertocase "$CONFIG_ARGS" in 5382498Sroberto *--with-crypto=autokey*) 5482498Sroberto KEYSUF="-autokey" 5582498Sroberto ;; 5682498Sroberto *--without-crypto*) 57132451Sroberto KEYSUF="-noopenssl" 5882498Sroberto ;; 5982498Srobertoesac 6082498Sroberto 6154359SrobertoCCSUF="" 6254359Sroberto 6354359Srobertocase "$CC" in 6454359Sroberto '') ;; 6554359Sroberto *) CCSUF="-$CC" 6654359Sroberto ;; 6754359Srobertoesac 6854359Sroberto 6982498SrobertoBDIR="$BDIR$KEYSUF$CCSUF" 7054359Sroberto 7154359Sroberto[ -d "$BDIR" ] || mkdir $BDIR 7254359Sroberto[ -f "$BDIR/.buildcvo" ] || echo $CVO > $BDIR/.buildcvo 7354359Sroberto[ -f "$BDIR/.buildhost" ] || echo $IAM > $BDIR/.buildhost 7454359Sroberto 7554359Srobertocd $BDIR 7654359Sroberto 7754359Sroberto( 7854359Sroberto[ -f config.status ] || ../configure $CONFIG_ARGS 7954359Sroberto 8082498Sroberto./config.status 8182498Sroberto 8254359Srobertocase "$MAKE" in 8354359Sroberto '') make && make check 8454359Sroberto ;; 8554359Sroberto *) $MAKE && $MAKE check 8654359Sroberto ;; 8754359Srobertoesac 8856746Sroberto) > $LOGF 2>&1 89