| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100 |
- #!/bin/sh
- #edit this to your homedir (no trailing slash)
- TCLDIR="/home/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
- # make clean, just in case
- echo "Cleaning up old binaries..."
- make distclean > /dev/null
- # Run ./configure, then verify it's ok
- echo "Configuring..."
- #./configure > /dev/null 2>configure.temp
- ./configure --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
- # 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 readlog -a -f makebot -a -f makepack -a -f stringfix
- #then
- # echo "Util build failed"
- # exit 1
- #fi
- # Build leaf and check
- echo "Building leaf..."
- make config CFLGS="-DHUB $defines" > /dev/null
- #make -j sdebug CFLGS="-DLEAF $defines" > /dev/null
- make static CFLGS="-DLEAF $defines" > /dev/null
- mv -f eggdrop leaf
- if ! test -f leaf
- then
- echo "leaf build failed"
- exit 1
- fi
- # Build hub and check
- echo "Building hub..."
- make clean > /dev/null
- make config CFLGS="-DHUB $defines" > /dev/null
- #make -j sdebug CFLGS="-DHUB $defines" > /dev/null
- make static CFLGS="-DHUB $defines" > /dev/null
- mv -f eggdrop hub
- if ! test -f hub
- then
- echo "hub build failed"
- exit 1
- fi
- make clean > /dev/null
|