#!/bin/sh # This is a frontend for the project.mk - based build system. TARGET="$1" [ -z "$TARGET" ] && TARGET=all HERE=$(readlink -f .) if [ ! -f "Makefile" ]; then [ "/" == "$HERE" ] && echo "No Makefile found." && exit 1 UP=$(dirname $HERE) REL=$(basename $HERE) echo Checking parent $UP cd $UP exec $0 $REL/$TARGET fi try () { echo "ATTEMPT: $@" "$@" && exit 0 } # DWIM try make $(readlink -f .)/$TARGET try make $TARGET try make $(basename $TARGET)