Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Merge branch 'master' of git+ssh://scm.gforge.inria.fr//gitroot/simgrid/simgrid
authorscastelli <stephane.castelli@inria.fr>
Wed, 4 Jun 2014 18:27:06 +0000 (20:27 +0200)
committerscastelli <stephane.castelli@inria.fr>
Wed, 4 Jun 2014 18:27:06 +0000 (20:27 +0200)
Conflicts:
src/smpi/smpiff.in

1  2 
src/smpi/smpif90.in
src/smpi/smpiff.in

Simple merge
@@@ -6,11 -6,10 +6,18 @@@
  # This program is free software; you can redistribute it and/or modify it
  # under the terms of the license (GNU LGPL) which comes with this package.
  
++<<<<<<< HEAD
 +SIMGRID_VERSION="@SIMGRID_VERSION_STRING@"
 +
 +prefix="@exec_prefix@"
 +smpicc="$prefix/bin/smpicc"
 +smpif2c="$prefix/bin/smpif2c"
++=======
+ F77=@GFORTRAN_EXE@
+ INCLUDEARGS="@includeflag@"
+ CMAKE_LINKARGS="-L@libdir@"
++>>>>>>> 167177a9f2980982c1bb3f89ec90fc1937395cd5
  
  @SMPITOOLS_SH@
  
@@@ -22,23 -30,21 +38,26 @@@ while [ $# -gt 0 ]; d
      ARG="$1"
      shift
      case "${ARG}" in
-         *.f)
-             SRCFILE="$(readlink -f ${ARG} 2>/dev/null)"
-             if [ -z "$SRCFILE" ] ; then
-                 SRCFILE="$ARG"
-             fi
-             list_add SRCFILES "${SRCFILE}"
+         -c)
+             CMAKE_LINKARGS=""
+             LINKARGS=""
+             list_add CMDLINE "-c"
+             ;;
+         *.f|*.F)
+             TMPFILE=$(mymktemp "${ARG}" ".f")
+             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}"
+             SRCFILE="${TMPFILE}"
+             list_add CMDLINE "${SRCFILE}"
              ;;
 +        '-version' | '--version' | '-v')
 +            # -e is not recognised by MS-DOS...
 +            echo -e $SIMGRID_VERSION
 +            exit 0
 +            ;;           
          *)
-             if [ "${ARG}" = "-c" ]; then
-                 LINKARGS=""
-             fi
-             list_add ARGS "${ARG}"
+             list_add CMDLINE "${ARG}"
              ;;
      esac
  done