#!/bin/csh -f
#
# main build script for dmalloc
#

# Get source/build directories.  Use local disk if necessary.
attach -q -n -h wwwdev
set srcdir=/mit/wwwdev/src/dmalloc-3.1.3
set blddir=/mit/wwwdev/build/$ATHENA_SYS/dmalloc-3.1.3
if (! -w /mit/wwwdev/build) set blddir=/usr/tmp/$USER/dmalloc-3.1.3

### we don't want to try this using a different compiler...
echo "   (adding Cygnus to your path...)"
add -f cygnus

### create or fix the build tree (using synctree)
if ( ! $?no_sync ) then
   mkdir -p $blddir
   /usr/athena/etc/synctree -q -s $srcdir -d $blddir
endif

pushd $blddir
if ( ! $?no_conf ) then
	./configure
endif

### finally, here we go...
make all | tee all.log
