#!/bin/bash # Always build in the current directory. Use fully qualified # canonical names to avoid confusion. BUILDDIR=$(readlink -f .) cd `dirname $0` SRCDIR=$(readlink -f .) if [ $SRCDIR == $BUILDDIR ]; then BUILDDIR=$SRCDIR/build echo "Can't build in source dir $SRDCIR." echo "Will build in $BUILDDIR instead." mkdir -p $BUILDDIR fi 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 # Build starting point is a single Makefile. rm -f $BUILDDIR/Makefile ln -s $SRCDIR/project.mk $BUILDDIR/Makefile # execute main configure script exec perl $SRCDIR/bin/configure.pl $* 2>>$LOG