X-Git-Url: http://rtime.felk.cvut.cz/gitweb/omk.git/blobdiff_plain/648d103dac0132ea136252c3eecd82d6dcea11eb..34899447cc627f9c4ecc929863ee41f48baefea0:/omk diff --git a/omk b/omk new file mode 100755 index 0000000..89e66cb --- /dev/null +++ b/omk @@ -0,0 +1,18 @@ +#!/bin/sh + +# Helper script to run OMK from directories without the leaf OMK Makefile + +omk_rules=$( +old_pwd="" +while [ ! -e Makefile.rules ]; do + if [ "$old_pwd" = `pwd` ]; then + echo "Makefile.rules has not been found in this or parent directory" >&2; exit 1; + else + old_pwd=`pwd`; + cd -L .. 2>/dev/null; + fi; +done; +echo `pwd`/Makefile.rules +) + +[ "$omk_rules" ] && make -f $omk_rules "$@"