*** empty log message ***
[arla.git] / scripts / build-arla.sh
blob2a29f6666fd498fcc61402b30444ab38fef2f93f
1 #!/bin/sh
2 # $Id$
4 # This script will build a release of arla /usr/obj/arla-$VERSION
7 ppath=`dirname $0`
8 test -f ${ppath}/test-config && . ${ppath}/test-config
11 if [ X$ADIR = X ]; then
12 ADIR=/nfsafs/e.kth.se/home/staff/lha/src/cvs/arla-0.35
15 export VERSION ADIR
17 if [ ! -d /nfsafs/stacken.kth.se ] ;then
18 mount -t nfs -o soft afs.pdc.kth.se:/afs /nfsafs
20 if [ ! -d /nfsafs/stacken.kth.se ] ;then
21 mount -F nfs afs.pdc.kth.se:/afs /nfsafs
23 if [ ! -d /nfsafs/stacken.kth.se ] ;then
24 echo Oppps, no /nfsafs
25 exit 1
28 MAKE=make
30 eval `grep '^VERSION=' $ADIR/configure.in`
32 if [ X$VERSION = X ]; then
33 echo "Failed to find version of arla"
34 exit 1
37 OBJDIR=/usr/obj/arla-$VERSION
39 os=`$ADIR/config.guess`
40 case "$os" in
41 *-*-*netbsd*)
42 CONFIG_ARGS="--with-roken=/usr --with-roken-include=/usr/include/krb5"
44 esac
46 echo Objdir is $OBJDIR
48 rm -rf $OBJDIR
49 mkdir -p $OBJDIR
50 cd $OBJDIR
52 echo "Building arla echo $VERSION test script" > log 2>&1
53 echo "Platform: `uname -a`" >> log 2>&1
54 echo "Gnuname: $os" >> log 2>&1
55 date >> log 2>&1
56 echo Objdir is $OBJDIR >> log 2>&1
58 echo "Configure"
59 echo $CONFIG_ENV $ADIR/configure $CONFIG_ARGS >> log
60 env $CONFIG_ENV $ADIR/configure $CONFIG_ARGS >> log 2>&1
61 e=$?
62 if [ $e != 0 ] ; then
63 echo "Configure failed with: $e" >> log
64 echo "Configure failed with: $e"
65 exit $e
68 echo "Make"
69 $MAKE >> log 2>&1
70 e=$?
71 if [ $e != 0 ] ; then
72 echo "Make failed with: $e" >> log
73 echo "Make failed with: $e"
74 exit $e
77 echo "Cleaning target dir"
78 rm -rf /usr/arla
80 echo "Install"
81 $MAKE install >> log 2>&1
82 e=$?
83 if [ $e != 0 ] ; then
84 echo "Install failed with: $e" >> log
85 echo "Install failed with: $e"
86 exit $e
89 echo Done
90 date >> log 2>&1
91 echo Done >> log 2>&1