#!/bin/bash # custom configure & build system. # all files reside in the build/ dir # set some env variables and call pconfigure BUILDDIR=`pwd` cd `dirname $0` SRCDIR=`pwd` # don't build in the source dir if [ $SRCDIR == $BUILDDIR ] then BUILDDIR=$SRCDIR/build mkdir -p $BUILDDIR fi # copy build template if [ $SRCDIR/mk != $BUILDDIR ] then echo initializing build tree cp -R $SRCDIR/mk/* $BUILDDIR/ else echo "WARNING: building in mk/ template directory!" fi cd $BUILDDIR # the build log contains the stderr output of # the entire configure-build-install process, and # some additional info for trouble shooting # hack [ -n "$LOG" ] && ln -s $LOG $BUILDDIR/build.log LOG=$BUILDDIR/build.log echo "source: $SRCDIR" echo "build: $BUILDDIR" export SRCDIR export BUILDDIR # gather some data echo >>$LOG echo -n "libpf configure -- " >>$LOG date >>$LOG echo >>$LOG uname -a >>$LOG echo >>$LOG # execute main configure script exec perl $SRCDIR/bin/configure.pl $* 2>>$LOG