From 534e8a062dacf4b7bd5fe2ccf763ef30fe3fbfc3 Mon Sep 17 00:00:00 2001 From: Matthieu Volat Date: Thu, 12 Jan 2017 20:38:58 +0100 Subject: [PATCH] In smpiff/smpif90 program, make -o consume the next argument. Else, when used for example in preprocessor mode, the output file, name something.f would be interpreted as an input file by the argument parsing loop. --- src/smpi/smpif90.in | 4 ++++ src/smpi/smpiff.in | 3 ++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/smpi/smpif90.in b/src/smpi/smpif90.in index 200d7a6dc4..04a16d67cb 100644 --- a/src/smpi/smpif90.in +++ b/src/smpi/smpif90.in @@ -65,6 +65,10 @@ while [ $# -gt 0 ]; do '-compiler-version' | '--compiler-version') ${F90} --version ;; + -o) + list_add CMDLINE "-o$1" + shift + ;; *) list_add CMDLINE "${ARG}" ;; diff --git a/src/smpi/smpiff.in b/src/smpi/smpiff.in index c63b5240fb..7ab94130a3 100644 --- a/src/smpi/smpiff.in +++ b/src/smpi/smpiff.in @@ -81,7 +81,8 @@ while [ $# -gt 0 ]; do ;; -o) NEEDS_OUTPUT=0 - list_add CMDLINE "-o" + list_add CMDLINE "-o$1" + shift ;; *) list_add CMDLINE "${ARG}" -- 2.20.1