Enhance the detection of compilation targets. The grep for main is not

sufficient. Use the fact that, in "make help", the target names have not
suffix, even on Windows.
This commit is contained in:
Laurent Rineau 2010-12-21 23:00:48 +00:00
parent ea27b02255
commit f353d629ea
1 changed files with 1 additions and 1 deletions

View File

@ -147,7 +147,7 @@ EOF
tmp=`basename $file .C` tmp=`basename $file .C`
tmp=`basename $tmp .cpp` tmp=`basename $tmp .cpp`
cat <<EOF cat <<EOF
if \${MAKE_CMD} -f Makefile help | grep "$tmp" > /dev/null; then if \${MAKE_CMD} -f Makefile help | grep -E "$tmp\$" > /dev/null; then
compile_and_run $tmp compile_and_run $tmp
NEED_CLEAN=y NEED_CLEAN=y
fi fi