1999-12-09 13:01:21 +00:00
|
|
|
#! /bin/sh
|
|
|
|
|
|
|
|
LOGF=make.log
|
|
|
|
IAM=`hostname || uname -n`
|
2009-12-12 22:29:30 +00:00
|
|
|
MYNAME=`IFS=. ; set $IAM ; echo $1`
|
|
|
|
SIG=
|
1999-12-09 13:01:21 +00:00
|
|
|
|
2001-08-29 14:35:15 +00:00
|
|
|
case "$1" in
|
|
|
|
0.*)
|
|
|
|
SIG=$1
|
|
|
|
shift
|
|
|
|
CONFIG_ARGS="$@"
|
2009-12-12 22:29:30 +00:00
|
|
|
KEY=`sed -e q < .buildkey-$MYNAME`
|
2001-08-29 14:35:15 +00:00
|
|
|
case "$SIG" in
|
|
|
|
$KEY) ;;
|
|
|
|
*)
|
|
|
|
echo "Wrong directory for build on host $IAM"
|
2004-07-20 15:01:56 +00:00
|
|
|
echo "This is <`pwd`>"
|
|
|
|
echo "SIG is <$SIG>"
|
|
|
|
echo "KEY is <$KEY>"
|
2001-08-29 14:35:15 +00:00
|
|
|
exit 1
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
CONFIG_ARGS="$@"
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
1999-12-09 13:01:21 +00:00
|
|
|
#set -e
|
|
|
|
#set -x
|
|
|
|
|
|
|
|
CVO=`./config.guess`
|
|
|
|
case "$CVO" in
|
|
|
|
*-*-*) ;;
|
|
|
|
*) echo "config.guess returned <$CVO>, which makes no sense to me."
|
|
|
|
exit 1
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
|
|
|
case "$IAM" in
|
|
|
|
*.udel.edu)
|
|
|
|
BDIR=A.$MYNAME
|
2008-08-18 14:26:05 +00:00
|
|
|
CONFIG_ARGS="$CONFIG_ARGS --enable-local-libopts"
|
|
|
|
case "$CVO" in
|
|
|
|
*-*-ultrix*)
|
|
|
|
CONFIG_ARGS="$CONFIG_ARGS --with-libregex=/usr/local"
|
|
|
|
;;
|
|
|
|
esac
|
1999-12-09 13:01:21 +00:00
|
|
|
;;
|
|
|
|
*)
|
|
|
|
BDIR=A.$CVO
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
2001-08-29 14:35:15 +00:00
|
|
|
KEYSUF=""
|
|
|
|
|
|
|
|
case "$CONFIG_ARGS" in
|
|
|
|
*--with-crypto=autokey*)
|
|
|
|
KEYSUF="-autokey"
|
|
|
|
;;
|
|
|
|
*--without-crypto*)
|
2004-07-20 15:01:56 +00:00
|
|
|
KEYSUF="-noopenssl"
|
2001-08-29 14:35:15 +00:00
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
2008-08-18 14:26:05 +00:00
|
|
|
case "$CONFIG_ARGS" in
|
|
|
|
*--disable-all-clocks*)
|
|
|
|
KEYSUF="$KEYSUF-no-refclocks"
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
|
|
|
case "$CONFIG_ARGS" in
|
|
|
|
*--disable-debugging*)
|
|
|
|
KEYSUF="$KEYSUF-nodebug"
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
1999-12-09 13:01:21 +00:00
|
|
|
CCSUF=""
|
|
|
|
|
|
|
|
case "$CC" in
|
|
|
|
'') ;;
|
|
|
|
*) CCSUF="-$CC"
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
2001-08-29 14:35:15 +00:00
|
|
|
BDIR="$BDIR$KEYSUF$CCSUF"
|
1999-12-09 13:01:21 +00:00
|
|
|
|
|
|
|
[ -d "$BDIR" ] || mkdir $BDIR
|
|
|
|
[ -f "$BDIR/.buildcvo" ] || echo $CVO > $BDIR/.buildcvo
|
|
|
|
[ -f "$BDIR/.buildhost" ] || echo $IAM > $BDIR/.buildhost
|
|
|
|
|
2009-12-12 22:29:30 +00:00
|
|
|
|
1999-12-09 13:01:21 +00:00
|
|
|
cd $BDIR
|
|
|
|
|
2009-12-12 22:29:30 +00:00
|
|
|
#
|
|
|
|
# make sure we have a nice that works,
|
|
|
|
#
|
|
|
|
nice true && NICEB=nice
|
|
|
|
nice true || NICEB=./.nicebuild-$MYNAME-$SIG && (
|
|
|
|
cat > .nicebuild-$MYNAME-$SIG <<UNLYKUHLY
|
|
|
|
#! /bin/sh
|
|
|
|
shift
|
|
|
|
\$*
|
|
|
|
UNLYKUHLY
|
|
|
|
chmod +x .nicebuild-$MYNAME-$SIG
|
|
|
|
)
|
|
|
|
|
|
|
|
|
1999-12-09 13:01:21 +00:00
|
|
|
(
|
2009-12-12 22:29:30 +00:00
|
|
|
[ -f config.status ] || $NICEB -7 ../configure --config-cache \
|
|
|
|
$CONFIG_ARGS
|
1999-12-09 13:01:21 +00:00
|
|
|
|
2009-12-12 22:29:30 +00:00
|
|
|
$NICEB -5 ./config.status
|
2001-08-29 14:35:15 +00:00
|
|
|
|
1999-12-09 13:01:21 +00:00
|
|
|
case "$MAKE" in
|
2009-12-12 22:29:30 +00:00
|
|
|
'') $NICEB -14 make && $NICEB -10 make check
|
1999-12-09 13:01:21 +00:00
|
|
|
;;
|
2009-12-12 22:29:30 +00:00
|
|
|
*) $NICEB -14 $MAKE && $NICEB -10 $MAKE check
|
1999-12-09 13:01:21 +00:00
|
|
|
;;
|
|
|
|
esac
|
2000-01-28 14:55:50 +00:00
|
|
|
) > $LOGF 2>&1
|