Remove reundant quote.
[netbsd-mini2440.git] / dist / ntp / build
blob4eab58e0d375763c0ce6d7c7a325d5a01f1522ed
1 #! /bin/sh
3 LOGF=make.log
4 IAM=`hostname || uname -n`
6 case "$1" in
7 0.*)
8 SIG=$1
9 shift
10 CONFIG_ARGS="$@"
11 KEY=`sed -e q < .buildkey`
12 case "$SIG" in
13 $KEY) ;;
15 echo "Wrong directory for build on host $IAM"
16 echo "This is <`pwd`>"
17 echo "SIG is <$SIG>"
18 echo "KEY is <$KEY>"
19 exit 1
21 esac
24 CONFIG_ARGS="$@"
26 esac
28 #set -e
29 #set -x
31 CVO=`./config.guess`
32 case "$CVO" in
33 *-*-*) ;;
34 *) echo "config.guess returned <$CVO>, which makes no sense to me."
35 exit 1
37 esac
39 MYNAME=`IFS=. ; set $IAM ; echo $1`
41 case "$IAM" in
42 *.udel.edu)
43 BDIR=A.$MYNAME
44 CONFIG_ARGS="$CONFIG_ARGS --enable-local-libopts"
45 case "$CVO" in
46 *-*-ultrix*)
47 CONFIG_ARGS="$CONFIG_ARGS --with-libregex=/usr/local"
49 esac
52 BDIR=A.$CVO
54 esac
56 KEYSUF=""
58 case "$CONFIG_ARGS" in
59 *--with-crypto=autokey*)
60 KEYSUF="-autokey"
62 *--without-crypto*)
63 KEYSUF="-noopenssl"
65 esac
67 case "$CONFIG_ARGS" in
68 *--disable-all-clocks*)
69 KEYSUF="$KEYSUF-no-refclocks"
71 esac
73 case "$CONFIG_ARGS" in
74 *--disable-debugging*)
75 KEYSUF="$KEYSUF-nodebug"
77 esac
79 CCSUF=""
81 case "$CC" in
82 '') ;;
83 *) CCSUF="-$CC"
85 esac
87 BDIR="$BDIR$KEYSUF$CCSUF"
89 [ -d "$BDIR" ] || mkdir $BDIR
90 [ -f "$BDIR/.buildcvo" ] || echo $CVO > $BDIR/.buildcvo
91 [ -f "$BDIR/.buildhost" ] || echo $IAM > $BDIR/.buildhost
93 cd $BDIR
96 [ -f config.status ] || ../configure $CONFIG_ARGS
98 ./config.status
100 case "$MAKE" in
101 '') make && make check
103 *) $MAKE && $MAKE check
105 esac
106 ) > $LOGF 2>&1