#!/usr/bin/sh
#Compiler wrapper to only rebuild tests when input has changed
compiler="$1"; shift
sourcepath="$1"; shift
outpath="$1"; shift
if [ "${MUSTRT_ENFORCE_TEST_REBUILD}" == "1" ] || [ ! -f "${outpath}" ] || [ "${sourcepath}" -nt "${outpath}" ]; then
    $compiler "${sourcepath}" -o "${outpath}" $@
fi
