blob: b364c10dba55ee75549663561e03e472c276d2c3 [file] [log] [blame]
bart004dc0b2008-04-27 07:42:52 +00001#!/bin/sh
2
sewardj79df8ee2008-11-05 12:05:14 +00003# Figure out an absolute pathname to this file, based on
4# $0 (the name of the file) and $PWD.
5
6dollarzero=$0
bartd7899f72011-02-03 17:49:07 +00007if [ -h "${dollarzero}" ]; then
8 dollarzero=`readlink "${dollarzero}"`
9fi
sewardj79df8ee2008-11-05 12:05:14 +000010
sewardj8fff3ec2008-11-08 15:11:03 +000011if [ "${dollarzero#/}" = "${dollarzero}" ];
sewardj79df8ee2008-11-05 12:05:14 +000012then
13 # Relative name
14 scriptname=$PWD/$dollarzero;
15else
16 # Absolute name
17 scriptname=$dollarzero;
bart5b161472008-11-04 17:49:58 +000018fi
njn7bbc8d62007-02-19 04:09:24 +000019
sewardj79df8ee2008-11-05 12:05:14 +000020# echo "Name of this script: " $scriptname
21
22vgbasedir=`dirname $scriptname`
23
24# echo "VG base directory: " $vgbasedir
25
26
njna7a16eb2007-02-19 04:16:09 +000027# We set both VALGRIND_LIB and VALGRIND_LIB_INNER to handle normal and
28# 'inner' builds.
sewardj79df8ee2008-11-05 12:05:14 +000029VALGRIND_LIB="$vgbasedir/.in_place" \
30 VALGRIND_LIB_INNER="$vgbasedir/.in_place" \
31 "$vgbasedir/coregrind/valgrind" "$@"
njn7bbc8d62007-02-19 04:09:24 +000032