#!/bin/sh
showpwd=0
until [ -f Makefile ]; do
	pre=`basename \`pwd\``/$pre
	cd ..
	if [ "$PWD" = "/" ]; then
	    echo mk: Could not find Makefile.
	    exit -1
	fi
	showpwd=1
done
if [ ! -z $showpwd ]; then
	echo cd `pwd`
fi
if [ $# -gt 0 ]; then
    until [ $# -eq 0 ]; do
	tar="$tar $pre$1"
	shift
    done
    exec make $tar
else
    exec make
fi
