Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
d409dca665829b37d567ce6a0612b2e8a7aa5892
[simgrid.git] / teshsuite / xbt / parallel_log_crashtest
1 #! /bin/sh
2
3 # xbt/parallel_log_crashtest - temporary wrapper script for .libs/parallel_log_crashtest
4 # Generated by ltmain.sh - GNU libtool 1.5.24 (1.1220.2.456 2007/06/24 02:25:32)
5 #
6 # The xbt/parallel_log_crashtest program cannot be directly executed until all the libtool
7 # libraries that it depends on are installed.
8 #
9 # This wrapper script should never be moved out of the build directory.
10 # If it is, it will not operate correctly.
11
12 # Sed substitution that helps us do robust quoting.  It backslashifies
13 # metacharacters that are still active within double-quoted strings.
14 Xsed='/bin/sed -e 1s/^X//'
15 sed_quote_subst='s/\([\\`\\"$\\\\]\)/\\\1/g'
16
17 # Be Bourne compatible (taken from Autoconf:_AS_BOURNE_COMPATIBLE).
18 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
19   emulate sh
20   NULLCMD=:
21   # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
22   # is contrary to our usage.  Disable this feature.
23   alias -g '${1+"$@"}'='"$@"'
24   setopt NO_GLOB_SUBST
25 else
26   case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac
27 fi
28 BIN_SH=xpg4; export BIN_SH # for Tru64
29 DUALCASE=1; export DUALCASE # for MKS sh
30
31 # The HP-UX ksh and POSIX shell print the target directory to stdout
32 # if CDPATH is set.
33 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
34
35 relink_command="(cd /home/mquinson/CVSIMPORT/gras/gras/teshsuite; { test -z \"\${LIBRARY_PATH+set}\" || unset LIBRARY_PATH || { LIBRARY_PATH=; export LIBRARY_PATH; }; }; { test -z \"\${COMPILER_PATH+set}\" || unset COMPILER_PATH || { COMPILER_PATH=; export COMPILER_PATH; }; }; { test -z \"\${GCC_EXEC_PREFIX+set}\" || unset GCC_EXEC_PREFIX || { GCC_EXEC_PREFIX=; export GCC_EXEC_PREFIX; }; }; { test -z \"\${LD_RUN_PATH+set}\" || unset LD_RUN_PATH || { LD_RUN_PATH=; export LD_RUN_PATH; }; }; LD_LIBRARY_PATH=\"/home/mquinson/CVSIMPORT/gras/install/lib\"; export LD_LIBRARY_PATH; PATH=\"/usr/local/bin:/usr/bin:/bin:/usr/bin/X11:/usr/games:/home/mquinson/SCRIPTS:/usr/sbin:/sbin:/home/mquinson/CVSIMPORT/gras/install/bin\"; export PATH; gcc -g -Wall -Wunused -Wmissing-prototypes -Wmissing-declarations -Wpointer-arith -Wchar-subscripts -Wcomment -Wformat -Wwrite-strings -Wno-unused-function -Wno-strict-aliasing -Werror -g3 -o \$progdir/\$file parallel_log_crashtest.o  ../src/.libs/libgras.so -lnsl -lm -lpthread  -Wl,--rpath -Wl,/home/mquinson/CVSIMPORT/gras/gras/src/.libs -Wl,--rpath -Wl,/home/mquinson/CVSIMPORT/gras/install//lib ) "
36
37 # This environment variable determines our operation mode.
38 if test "$libtool_install_magic" = "%%%MAGIC variable%%%"; then
39   # install mode needs the following variable:
40   notinst_deplibs=' ../src/libgras.la'
41 else
42   # When we are sourced in execute mode, $file and $echo are already set.
43   if test "$libtool_execute_magic" != "%%%MAGIC variable%%%"; then
44     echo="echo"
45     file="$0"
46     # Make sure echo works.
47     if test "X$1" = X--no-reexec; then
48       # Discard the --no-reexec flag, and continue.
49       shift
50     elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then
51       # Yippee, $echo works!
52       :
53     else
54       # Restart under the correct shell, and then maybe $echo will work.
55       exec /bin/sh "$0" --no-reexec ${1+"$@"}
56     fi
57   fi
58
59   # Find the directory that this script lives in.
60   thisdir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`
61   test "x$thisdir" = "x$file" && thisdir=.
62
63   # Follow symbolic links until we get to the real thisdir.
64   file=`ls -ld "$file" | /bin/sed -n 's/.*-> //p'`
65   while test -n "$file"; do
66     destdir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`
67
68     # If there was a directory component, then change thisdir.
69     if test "x$destdir" != "x$file"; then
70       case "$destdir" in
71       [\\/]* | [A-Za-z]:[\\/]*) thisdir="$destdir" ;;
72       *) thisdir="$thisdir/$destdir" ;;
73       esac
74     fi
75
76     file=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
77     file=`ls -ld "$thisdir/$file" | /bin/sed -n 's/.*-> //p'`
78   done
79
80   # Try to get the absolute directory name.
81   absdir=`cd "$thisdir" && pwd`
82   test -n "$absdir" && thisdir="$absdir"
83
84   program=lt-'parallel_log_crashtest'
85   progdir="$thisdir/.libs"
86
87   if test ! -f "$progdir/$program" || \
88      { file=`ls -1dt "$progdir/$program" "$progdir/../$program" 2>/dev/null | /bin/sed 1q`; \
89        test "X$file" != "X$progdir/$program"; }; then
90
91     file="$$-$program"
92
93     if test ! -d "$progdir"; then
94       mkdir "$progdir"
95     else
96       rm -f "$progdir/$file"
97     fi
98
99     # relink executable if necessary
100     if test -n "$relink_command"; then
101       if relink_command_output=`eval $relink_command 2>&1`; then :
102       else
103         echo "$relink_command_output" >&2
104         rm -f "$progdir/$file"
105         exit 1
106       fi
107     fi
108
109     mv -f "$progdir/$file" "$progdir/$program" 2>/dev/null ||
110     { rm -f "$progdir/$program";
111       mv -f "$progdir/$file" "$progdir/$program"; }
112     rm -f "$progdir/$file"
113   fi
114
115   if test -f "$progdir/$program"; then
116     if test "$libtool_execute_magic" != "%%%MAGIC variable%%%"; then
117       # Run the actual program with our arguments.
118
119       # Make sure env LD_LIBRARY_PATH does not mess us up
120       if test -n "${LD_LIBRARY_PATH+set}"; then
121         export LD_LIBRARY_PATH=$progdir:$LD_LIBRARY_PATH
122       fi
123
124       exec "$progdir/$program" ${1+"$@"}
125
126       $echo "$0: cannot exec $program $*"
127       exit 1
128     fi
129   else
130     # The program doesn't exist.
131     $echo "$0: error: \`$progdir/$program' does not exist" 1>&2
132     $echo "This script is just a wrapper for $program." 1>&2
133     echo "See the libtool documentation for more information." 1>&2
134     exit 1
135   fi
136 fi