freebsd-nq/contrib/ntp/build

89 lines
1.2 KiB
Plaintext
Raw Normal View History

1999-12-09 13:01:21 +00:00
#! /bin/sh
LOGF=make.log
IAM=`hostname || uname -n`
2001-08-29 14:35:15 +00:00
case "$1" in
0.*)
SIG=$1
shift
CONFIG_ARGS="$@"
KEY=`sed -e q < .buildkey`
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
MYNAME=`IFS=. ; set $IAM ; echo $1`
case "$IAM" in
*.udel.edu)
BDIR=A.$MYNAME
;;
*)
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
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
cd $BDIR
(
[ -f config.status ] || ../configure $CONFIG_ARGS
2001-08-29 14:35:15 +00:00
./config.status
1999-12-09 13:01:21 +00:00
case "$MAKE" in
'') make && make check
;;
*) $MAKE && $MAKE check
;;
esac
2000-01-28 14:55:50 +00:00
) > $LOGF 2>&1