blob: a49036de996515fdf78e4505f827a6d403230e9c [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
7
sewardj8fff3ec2008-11-08 15:11:03 +00008if [ "${dollarzero#/}" = "${dollarzero}" ];
sewardj79df8ee2008-11-05 12:05:14 +00009then
10 # Relative name
11 scriptname=$PWD/$dollarzero;
12else
13 # Absolute name
14 scriptname=$dollarzero;
bart5b161472008-11-04 17:49:58 +000015fi
njn7bbc8d62007-02-19 04:09:24 +000016
sewardj79df8ee2008-11-05 12:05:14 +000017# echo "Name of this script: " $scriptname
18
19vgbasedir=`dirname $scriptname`
20
21# echo "VG base directory: " $vgbasedir
22
23
njna7a16eb2007-02-19 04:16:09 +000024# We set both VALGRIND_LIB and VALGRIND_LIB_INNER to handle normal and
25# 'inner' builds.
sewardj79df8ee2008-11-05 12:05:14 +000026VALGRIND_LIB="$vgbasedir/.in_place" \
27 VALGRIND_LIB_INNER="$vgbasedir/.in_place" \
28 "$vgbasedir/coregrind/valgrind" "$@"
njn7bbc8d62007-02-19 04:09:24 +000029