From 877195c3463b11ce268f8197195f9c5f31040ebc Mon Sep 17 00:00:00 2001 From: degomme Date: Wed, 20 Jan 2016 19:32:53 +0100 Subject: [PATCH] another fix to avoid issues with .f or .F in f77 --- src/smpi/smpiff.in | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/smpi/smpiff.in b/src/smpi/smpiff.in index 9cfa9fb611..90e01409a6 100644 --- a/src/smpi/smpiff.in +++ b/src/smpi/smpiff.in @@ -31,7 +31,6 @@ filter_and_compile() { list_add TMPFILES "${TMPFILE}" #replace "program main_name by subroutine user\_main (and the end clause as well)" sed 's/[[:space:]]\{6\}[[:space:]]*\(end \)\{0,1\}program[[:space:]]*\([a-zA-Z0-9\-\_]*\)/ \1subroutine user_main /gI;s/[[:space:]]*use[[:space:]]*mpi/\include \"mpif\.h\" /gI' "${ARG}" > "${TMPFILE}" - ORIGFILE="${ARG}" SRCFILE="${TMPFILE}" list_add CMDLINE "${SRCFILE}" } @@ -50,10 +49,12 @@ while [ $# -gt 0 ]; do ;; *.f) TMPFILE=$(mymktemp "${ARG}" ".f") + ORIGFILE="${ARG%.f}" filter_and_compile ;; *.F) TMPFILE=$(mymktemp "${ARG}" ".F") + ORIGFILE="${ARG%.F}" filter_and_compile ;; '-version' | '--version') @@ -78,7 +79,7 @@ while [ $# -gt 0 ]; do done if [ $NEEDS_OUTPUT -ne 0 ]; then - list_add CMDLINE "-o${ORIGFILE%.f}.o" + list_add CMDLINE "-o${ORIGFILE}.o" fi list_add_not_empty CMDLINE ${INCLUDEARGS} -- 2.20.1