diff options
Diffstat (limited to 'contrib/ntp/build')
-rwxr-xr-x | contrib/ntp/build | 37 |
1 files changed, 33 insertions, 4 deletions
diff --git a/contrib/ntp/build b/contrib/ntp/build index 8caf641..22252d3 100755 --- a/contrib/ntp/build +++ b/contrib/ntp/build @@ -1,11 +1,27 @@ #! /bin/sh LOGF=make.log - -CONFIG_ARGS="$@" - IAM=`hostname || uname -n` +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 + #set -e #set -x @@ -28,6 +44,17 @@ case "$IAM" in ;; esac +KEYSUF="" + +case "$CONFIG_ARGS" in + *--with-crypto=autokey*) + KEYSUF="-autokey" + ;; + *--without-crypto*) + [ -d rsaref2 ] && KEYSUF="-norsaref" + ;; +esac + CCSUF="" case "$CC" in @@ -36,7 +63,7 @@ case "$CC" in ;; esac -BDIR="$BDIR$CCSUF" +BDIR="$BDIR$KEYSUF$CCSUF" [ -d "$BDIR" ] || mkdir $BDIR [ -f "$BDIR/.buildcvo" ] || echo $CVO > $BDIR/.buildcvo @@ -47,6 +74,8 @@ cd $BDIR ( [ -f config.status ] || ../configure $CONFIG_ARGS +./config.status + case "$MAKE" in '') make && make check ;; |