Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
allow smpicc to survive to non-functionnal readlink on mac (by doing as if there...
authormquinson <mquinson@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Fri, 11 Dec 2009 12:53:16 +0000 (12:53 +0000)
committermquinson <mquinson@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Fri, 11 Dec 2009 12:53:16 +0000 (12:53 +0000)
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@6889 48e7efb5-ca39-0410-a469-dd3cf9ba447f

src/smpi/smpicc.in

index c72e180..c46d186 100755 (executable)
@@ -1,4 +1,4 @@
-#!/bin/bash
+#! /bin/bash
 #FIXME: .. paths...
 prefix="@prefix@"
 exec_prefix="@exec_prefix@"
@@ -54,7 +54,10 @@ while [ -n "$1" ]; do
   elif [ "${ARG%.c}" != "${ARG}" ]; then
     INCLUDEARGS="${INCLUDEARGS} -I . -I .. -I ../include -I @includedir@ "
 #    SRCFILE="$(realpath ${ARG})"
-    SRCFILE="$(readlink -f ${ARG})"
+    SRCFILE="$(readlink -f ${ARG} 2>/dev/null)"
+    if [ -z $SRCFILE ] ; then
+      SRCFILE="$ARG"
+    fi
     modsource ${SRCFILE}
     CMDLINE="${CMDLINE} ${TMPDIR}${SRCFILE} "
   else