diff options
author | Elliott Baron <ebaron@toriamos.yyz.redhat.com> | 2008-12-05 16:46:32 -0500 |
---|---|---|
committer | Elliott Baron <ebaron@toriamos.yyz.redhat.com> | 2008-12-05 16:46:32 -0500 |
commit | ece3457a5cc92f0968ebf52823af2d017d5272c1 (patch) | |
tree | 45833a5ca9d552032a1d52f005d5e92e1f3ab441 /run-stap.in | |
parent | 5cf5735849650a89aa3182dfbacd8218ac0f3b9e (diff) | |
parent | 2f62657ce707b4011253d533c0423ed8d49a3e9e (diff) | |
download | systemtap-steved-ece3457a5cc92f0968ebf52823af2d017d5272c1.tar.gz systemtap-steved-ece3457a5cc92f0968ebf52823af2d017d5272c1.tar.xz systemtap-steved-ece3457a5cc92f0968ebf52823af2d017d5272c1.zip |
Merge branch 'master'; commit 'origin/pr6925'
Diffstat (limited to 'run-stap.in')
-rw-r--r-- | run-stap.in | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/run-stap.in b/run-stap.in new file mode 100644 index 00000000..dfb53ab2 --- /dev/null +++ b/run-stap.in @@ -0,0 +1,36 @@ +#!/bin/sh + +srcdir='@abs_top_srcdir@' +builddir='@abs_top_builddir@' + +rundir="${0%/*}" +[ "$rundir" == "$0" ] || builddir="$rundir" + +# Absolutify the paths. +case "$srcdir" in +/*) ;; +*) srcdir=`cd "$srcdir" && pwd` || exit ;; +esac +case "$builddir" in +/*) ;; +*) builddir=`cd "$builddir" && pwd` || exit ;; +esac + +# Set all the variables to find the source and build trees. +SYSTEMTAP_TAPSET="${srcdir}/tapset" +SYSTEMTAP_RUNTIME="${srcdir}/runtime" +SYSTEMTAP_STAPIO="${builddir}/stapio" +SYSTEMTAP_STAPRUN="sudo 'SYSTEMTAP_STAPIO=$SYSTEMTAP_STAPIO' \ + 'SYSTEMTAP_STAPRUN=${builddir}/staprun' \ + ${builddir}/staprun" +export SYSTEMTAP_TAPSET SYSTEMTAP_RUNTIME SYSTEMTAP_STAPRUN SYSTEMTAP_STAPIO + +# If there were private elfutils libs built, use them. +if [ -d "$rundir/lib-elfutils" ]; then + lib_elfutils="$rundir/lib-elfutils" + elfutils_path="${lib_elfutils}:${lib_elfutils}/systemtap" + LD_LIBRARY_PATH="${elfutils_path}${LD_LIBRARY_PATH:+:}$LD_LIBRARY_PATH" + export LD_LIBRARY_PATH +fi + +exec "${builddir}/stap" ${1+"$@"} |