#!/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` if [ $SRCDIR == $BUILDDIR ] then # don't build in the source dir BUILDDIR=$SRCDIR/build else # copy build template if [ $SRCDIR/build != $BUILDDIR ] then echo copying build tree cp -R $SRCDIR/build/* $BUILDDIR/ fi 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