summaryrefslogtreecommitdiffstats
path: root/contrib/ntp/build
blob: 8caf6413a7e5a071b415f89409af52ef0007acdb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
#! /bin/sh

LOGF=make.log

CONFIG_ARGS="$@"

IAM=`hostname || uname -n`

#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

CCSUF=""

case "$CC" in
 '') ;;
 *) CCSUF="-$CC"
    ;;
esac

BDIR="$BDIR$CCSUF"

[ -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

case "$MAKE" in
 '') make && make check
     ;;
 *)  $MAKE && $MAKE check
     ;;
esac
) > $LOGF 2>&1
OpenPOWER on IntegriCloud