freebsd-skq/contrib/ntp/build

86 lines
1.1 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"
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*)
[ -d rsaref2 ] && KEYSUF="-norsaref"
;;
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