NetBSD/dist/ntp/build

95 lines
1.3 KiB
Plaintext
Raw Normal View History

2000-03-29 16:38:44 +04:00
#! /bin/sh
LOGF=make.log
IAM=`hostname || uname -n`
2003-12-04 19:05:14 +03: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"
echo "This is <`pwd`>"
echo "SIG is <$SIG>"
echo "KEY is <$KEY>"
exit 1
;;
esac
;;
*)
CONFIG_ARGS="$@"
;;
esac
2000-03-29 16:38:44 +04: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
2003-12-04 19:05:14 +03:00
KEYSUF=""
2000-04-22 18:51:59 +04:00
case "$CONFIG_ARGS" in
2003-12-04 19:05:14 +03:00
*--with-crypto=autokey*)
KEYSUF="-autokey"
;;
*--without-crypto*)
KEYSUF="-noopenssl"
2000-04-22 18:51:59 +04:00
;;
esac
2006-06-11 18:57:12 +04:00
case "$CONFIG_ARGS" in
*--disable-all-clocks*)
KEYSUF="$KEYSUF-no-refclocks"
;;
esac
2000-03-29 16:38:44 +04:00
CCSUF=""
case "$CC" in
'') ;;
*) CCSUF="-$CC"
;;
esac
2003-12-04 19:05:14 +03:00
BDIR="$BDIR$KEYSUF$CCSUF"
2000-03-29 16:38:44 +04: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
2003-12-04 19:05:14 +03:00
./config.status
2000-03-29 16:38:44 +04:00
case "$MAKE" in
'') make && make check
;;
*) $MAKE && $MAKE check
;;
esac
) > $LOGF 2>&1