#!/bin/sh set -e SRCDIR=$(pwd) OUTPUT=$(tools/outdir) SWITCHES="" if [ -n "$OUTPUT" -a -d "$OUTPUT" ]; then cd "$OUTPUT" SWITCHES="--output $OUTPUT" fi if [ ! -f Makefile -o \ $SRCDIR/Makefile.am -nt Makefile -o \ $SRCDIR/configure.ac -nt Makefile -o \ $SRCDIR/acprep -nt Makefile -o \ $SRCDIR/myacprep -nt Makefile ]; then (cd $SRCDIR && tools/myacprep "$SWITCHES") fi make "$@"