Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
In smpiff/smpif90 program, make -o consume the next argument.
authorMatthieu Volat <mazhe@alkumuna.eu>
Thu, 12 Jan 2017 19:38:58 +0000 (20:38 +0100)
committerdegomme <augustin.degomme@unibas.ch>
Fri, 13 Jan 2017 09:58:15 +0000 (10:58 +0100)
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
src/smpi/smpiff.in

index 200d7a6..04a16d6 100644 (file)
@@ -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}"
             ;;
index c63b524..7ab9413 100644 (file)
@@ -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}"