]>
Commit | Line | Data |
---|---|---|
2f62657c RM |
1 | #!/bin/sh |
2 | ||
3 | srcdir='@abs_top_srcdir@' | |
4 | builddir='@abs_top_builddir@' | |
5 | ||
6 | rundir="${0%/*}" | |
ff0f23d9 | 7 | [ "$rundir" = "$0" ] || builddir="$rundir" |
2f62657c RM |
8 | |
9 | # Absolutify the paths. | |
10 | case "$srcdir" in | |
11 | /*) ;; | |
12 | *) srcdir=`cd "$srcdir" && pwd` || exit ;; | |
13 | esac | |
14 | case "$builddir" in | |
15 | /*) ;; | |
16 | *) builddir=`cd "$builddir" && pwd` || exit ;; | |
17 | esac | |
18 | ||
19 | # Set all the variables to find the source and build trees. | |
20 | SYSTEMTAP_TAPSET="${srcdir}/tapset" | |
21 | SYSTEMTAP_RUNTIME="${srcdir}/runtime" | |
66c3c633 | 22 | SYSTEMTAP_STAPDYN="${builddir}/stapdyn/stapdyn" |
02311ab4 | 23 | SYSTEMTAP_STAPRUN="${builddir}/staprun/run-staprun" |
2466bf70 | 24 | export SYSTEMTAP_TAPSET SYSTEMTAP_RUNTIME SYSTEMTAP_STAPDYN SYSTEMTAP_STAPRUN |
2f62657c RM |
25 | |
26 | # If there were private elfutils libs built, use them. | |
27 | if [ -d "$rundir/lib-elfutils" ]; then | |
28 | lib_elfutils="$rundir/lib-elfutils" | |
29 | elfutils_path="${lib_elfutils}:${lib_elfutils}/systemtap" | |
30 | LD_LIBRARY_PATH="${elfutils_path}${LD_LIBRARY_PATH:+:}$LD_LIBRARY_PATH" | |
31 | export LD_LIBRARY_PATH | |
32 | fi | |
33 | ||
47088594 JS |
34 | if [ -z "$DEBUG_STAP" ]; then |
35 | exec "${builddir}/stap" ${1+"$@"} | |
36 | else | |
4f581fcf | 37 | exec ${GDB:-gdb} --args "${builddir}/stap" ${1+"$@"} |
47088594 | 38 | fi |