Home | History | Annotate | Download | only in main
      1 #!/bin/sh
      2 
      3 # Figure out an absolute pathname to this file, based on
      4 # $0 (the name of the file) and $PWD.
      5 
      6 dollarzero=$0
      7 if [ -h "${dollarzero}" ]; then
      8    dollarzero=`readlink "${dollarzero}"`
      9 fi
     10 
     11 if [ "${dollarzero#/}" = "${dollarzero}" ];
     12 then
     13    # Relative name
     14    scriptname=$PWD/$dollarzero;
     15 else
     16    # Absolute name
     17    scriptname=$dollarzero;
     18 fi
     19 
     20 # echo "Name of this script: " $scriptname
     21 
     22 vgbasedir=`dirname $scriptname`
     23 
     24 # echo "VG base directory:   " $vgbasedir
     25 
     26 
     27 # We set both VALGRIND_LIB and VALGRIND_LIB_INNER to handle normal and
     28 # 'inner' builds.
     29 VALGRIND_LIB="$vgbasedir/.in_place" \
     30     VALGRIND_LIB_INNER="$vgbasedir/.in_place" \
     31     "$vgbasedir/coregrind/valgrind" "$@"
     32 
     33