| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990 |
- #!/bin/sh
- #edit this to your homedir (no trailing slash)
- TCLDIR="/home/wheel/bryan"
- #### DO NOT EDIT BELOW THIS LINE #####
- # Figure out whether to use default or a specified config file
- if test $1
- then
- packname=$1
- else
- packname=default
- fi
- # Verify we got the config file
- if ! test -f $packname.conf
- then
- echo "Can't find pack configuration file $packname.conf"
- exit 1
- fi
- # Figure what bins we're making
- case `uname` in
- Linux) prefix=linux;;
- FreeBSD) case `uname -r` in
- 4*) prefix=freebsd4;;
- 3*) prefix=freebsd3;;
- esac;;
- OpenBSD) prefix=openbsd;;
- esac
- if test -z $prefix
- then
- echo "Automated packing disabled, `uname` isn't recognized"
- fi
- # Run ./configure, then verify it's ok
- echo "Configuring..."
- ./configure --disable-tcl-threads --with-tcllib=${TCLDIR}/lib/libtcl8.4.a --with-tclinc=${TCLDIR}/include/tcl.h > /dev/null 2>configure.temp
- #if test "`cat configure.temp`"
- #then
- # echo "Configure error'd"
- # cat configure.temp
- #
- # exit 1
- #fi
- #rm -f configure.temp
- # make clean, just in case
- echo "Cleaning up old binaries..."
- make clean > /dev/null
- # Read the config
- echo -n "Pack configuration:"
- for cnf in `cat $packname.conf | grep -v "^#"`
- do
- defines="$defines -DS_$cnf"
- echo -n "$cnf "
- done
- echo ""
- # Build utils and check we got the bins
- echo "Building utils..."
- make utils CFLGS="$defines" > /dev/null
- if ! test -f stringfix
- then
- echo "Util build failed"
- exit 1
- fi
- # Build leaf and check
- echo "Building leaf..."
- make leaf CFLGS="$defines" > /dev/null
- if ! test -f leaf
- then
- echo "leaf build failed"
- exit 1
- fi
- # Build hub and check
- echo "Building hub..."
- make hub CFLGS="$defines" > /dev/null
- if ! test -f hub
- then
- echo "hub build failed"
- exit 1
- fi
|