From: Arnaud Giersch Date: Thu, 24 Oct 2013 15:12:30 +0000 (+0200) Subject: Try to fix mess with exit status. X-Git-Tag: v3_10_rc1~78 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/53dd25b9ed24cc22b4d9e5d2ab0814413afce442 Try to fix mess with exit status. --- diff --git a/src/smpi/smpiff.in b/src/smpi/smpiff.in index 7b497ea001..25ea41a982 100644 --- a/src/smpi/smpiff.in +++ b/src/smpi/smpiff.in @@ -34,10 +34,12 @@ then cp ${SRCFILE} ${TMPFILE} CFILE="${TMPFILE%.f}.c" #echo "$prefix/bin/smpif2c ${TMPFILE} && $prefix/bin/smpicc ${ARGS} ${CFILE} && rm ${CFILE} && rm ${TMPFILE}" - $prefix/bin/smpif2c ${TMPFILE} && $prefix/bin/smpicc ${ARGS} ${CFILE} && rm ${CFILE} && rm ${TMPFILE} + $prefix/bin/smpif2c ${TMPFILE} && $prefix/bin/smpicc ${ARGS} ${CFILE} && rm ${CFILE} && rm ${TMPFILE} || exit $? # When the file is compiled with "-c" and no output file is specified with - # "-o", rename the output. - test -f ${CFILE%.c}.o && mv ${CFILE%.c}.o ${SRCFILE%.f}.o + # "-o", rename the output. FIXME: do it properly. + if [ -f ${CFILE%.c}.o ]; then + mv ${CFILE%.c}.o ${SRCFILE%.f}.o + fi done else #echo "$prefix/bin/smpicc ${ARGS}"