X-Git-Url: https://git.lttng.org/?a=blobdiff_plain;f=trunk%2Flttv%2Frunlttv;h=60fe83b53572fd6d11273ec9b1962f3f8f5c086c;hb=9564b36f417e52c4abbeed7b99bbe62adea6f6fe;hp=acabded47d847e9f8e535bd14b02399ecaf84c6d;hpb=94e22cd1c823238e930c51344f973a6377acd021;p=lttv.git diff --git a/trunk/lttv/runlttv b/trunk/lttv/runlttv index acabded4..60fe83b5 100755 --- a/trunk/lttv/runlttv +++ b/trunk/lttv/runlttv @@ -2,7 +2,8 @@ # Released under the GPL # pmf - 2008/07/31 -# This script runs LTTV in place in the compile directory without need for installing it with make install. +# This script runs LTTV in place in the compile directory without need for +# installing it with make install. # # The .runlttvrc file can be used to control its behavior. # - by setting the TRACEFILE variable, a trace can be automatically loaded @@ -10,24 +11,31 @@ # - by setting the ARGS variable, a different set of plugins can be loaded # for an example see the ARGS= line below # -# In order for icons to display correctly, it might be necessary to create a symlink: +# In order for icons to display correctly, it might be necessary to create a +# symlink: # $ ln -s ./lttv/modules/gui/lttvwindow/pixmaps # while in the same directory as this script. RCFILE=".runlttvrc" ARGS="-L lttv/modules/gui/controlflow/.libs -m guicontrolflow -L lttv/modules/gui/lttvwindow/lttvwindow/.libs -m lttvwindow -L lttv/modules/gui/detailedevents/.libs -m guievents -L lttv/modules/gui/tracecontrol/.libs -m guitracecontrol -L lttv/modules/gui/statistics/.libs -m guistatistics -L lttv/modules/gui/resourceview/.libs -m resourceview -L lttv/modules/gui/filter/.libs -m guifilter -L lttv/modules/gui/interrupts/.libs -m interrupts -L lttv/modules/gui/histogram/.libs -m guihistogram" +LTTV_EXEC="lttv/lttv/.libs/lttv.real" + +if [ ! -e "$LTTV_EXEC" ]; then + echo "error: LTTV should be compiled before running this script." >/dev/stderr + exit 1 +fi if [ -e "$RCFILE" ]; then source "$RCFILE"; fi if [ "$1" = "dbg" ]; then - LD_LIBRARY_PATH=ltt/.libs gdb --args lttv/lttv/.libs/lttv.real $ARGS $TRACEFILE + LD_LIBRARY_PATH=ltt/.libs gdb --args $LTTV_EXEC $ARGS $TRACEFILE elif [ "$1" = "valgrind" ]; then - LD_LIBRARY_PATH=ltt/.libs valgrind lttv/lttv/.libs/lttv.real $ARGS $TRACEFILE + LD_LIBRARY_PATH=ltt/.libs valgrind $LTTV_EXEC $ARGS $TRACEFILE elif [ "$1" = "strace" ]; then - LD_LIBRARY_PATH=ltt/.libs strace lttv/lttv/.libs/lttv.real $ARGS $TRACEFILE + LD_LIBRARY_PATH=ltt/.libs strace $LTTV_EXEC $ARGS $TRACEFILE else - LD_LIBRARY_PATH=ltt/.libs lttv/lttv/.libs/lttv.real $ARGS $TRACEFILE + LD_LIBRARY_PATH=ltt/.libs $LTTV_EXEC $ARGS $TRACEFILE fi