X-Git-Url: https://plomlompom.com/repos/?a=blobdiff_plain;f=redo;h=f2eef6740134da247468606e14ae61288a04266a;hb=refs%2Fheads%2F7drl;hp=da2637beff1876add1a2f33e998f7ff95968cb7f;hpb=109dc4e8a5d9f09541ef2dcb84bd6b6ac2e2fb00;p=plomrogue diff --git a/redo b/redo index da2637b..f2eef67 100755 --- a/redo +++ b/redo @@ -13,17 +13,32 @@ # build/redo_scripts/. For details on this version, see: # - # - -# -# This "redo" implementation may experience trouble on OS X systems, see -# for a -# workaround. -if [ ! -e ./libplomrogue.so ] +# Some tests first: for gcc, and certain necessary header files. (This is not +# strictly the responsibility of a mere redo wrapper. But those using a +# pre-installed redo probably will be fine with the error messages thrown by it +# if these miss.) +test=`command -v gcc | wc -l` +if [ 1 != $test ] then - echo "non-redo stuff (preparing for future Python port sans redo needs):" - echo "Building library for server's Python variant with mere shell one-liner." - ./compile-server.sh + echo "FAILURE:" + echo "No gcc installed, but it's needed!" + exit 1 fi +test_header() { + code="#include <$1>" + test=`echo $code | cpp -H -o /dev/null 2>&1 | head -n1 | grep error | wc -l` + if [ 0 != $test ] + then + echo "FAILURE:" + echo "No $1 header file found, but it's needed!" + echo "Maybe install some $2 package?" + exit 1 + fi +} +test_header stdlib.h libc6-dev # Assume stdlib.h guarantees full libc6-dev. +test_header ncurses.h libncurses5-dev +# The actual redo calling. export PATH=$PATH:$PWD/build/redo_scripts redo "$@"