add lttv wrapper
authorcompudj <compudj@04897980-b3bd-0310-b5e0-8ef037075253>
Fri, 16 Sep 2005 01:15:06 +0000 (01:15 +0000)
committercompudj <compudj@04897980-b3bd-0310-b5e0-8ef037075253>
Fri, 16 Sep 2005 01:15:06 +0000 (01:15 +0000)
git-svn-id: http://ltt.polymtl.ca/svn@1208 04897980-b3bd-0310-b5e0-8ef037075253

ltt/branches/poly/configure.in
ltt/branches/poly/lttv/lttv/Makefile.am
ltt/branches/poly/lttv/lttv/lttv-gui.sh [new file with mode: 0644]
ltt/branches/poly/lttv/lttv/lttv.sh [new file with mode: 0644]

index 62db1a533105582faabbcdda60aaecd23a264cca..4fa7c6d3b951ba3f237d379fe420c8ccb435ea84 100644 (file)
@@ -31,6 +31,8 @@ AM_PATH_GLIB_2_0(2.4.0, ,AC_MSG_ERROR([glib is required in order to compile Linu
 
 AM_PATH_GTK_2_0(2.4.0, ,AC_MSG_ERROR([gtk is required in order to compile GUI - download it from ftp://ftp.gtk.org/pub/gtk]) , gmodule)
 
+AC_PATH_PROGS(BASH, bash)
+
 AC_SYS_LARGEFILE
 
 # Checks for programs.
index fb7e13291c191ce6656a97b179ed668250dbe45d..442f2477668cef75176826fe3a734caabdf2c4c3 100644 (file)
@@ -1,7 +1,24 @@
 AM_CFLAGS = $(GLIB_CFLAGS) 
 LIBS += $(POPT_LIBS) $(GLIB_LIBS) -lgobject-2.0 -L$(top_srcdir)/ltt -ltraceread
 
-bin_PROGRAMS = lttv
+bin_PROGRAMS = lttv.real
+
+bin_SCRIPTS = lttv lttv-gui
+CLEANFILES = $(bin_SCRIPTS)
+EXTRA_DIST = lttv.sh lttv-gui.sh
+
+lttv: lttv.sh
+       rm -f lttv
+       echo "#!"$(BASH) > lttv
+       cat lttv.sh >> lttv
+       chmod ugo+x lttv
+
+lttv-gui: lttv-gui.sh
+       rm -f lttv-gui
+       echo "#!"$(BASH) > lttv-gui
+       cat lttv-gui.sh >> lttv-gui
+       chmod ugo+x lttv-gui
+
 
 INCLUDES = \
        -DPACKAGE_PLUGIN_DIR=\""$(lttvplugindir)"\" \
@@ -27,11 +44,11 @@ lttvinclude_HEADERS = \
 #noinst_HEADERS = \
 #      filter.h
 
-lttv_SOURCES = batchtest.c main.c module.c option.c \
+lttv_real_SOURCES = batchtest.c main.c module.c option.c \
                hook.c attribute.c \
                iattribute.c state.c stats.c \
               tracecontext.c traceset.c filter.c print.c
 
 if LTTVSTATIC
-  lttv_LDFLAGS = -profile -static
+  lttv_real_LDFLAGS = -profile -static
 endif
diff --git a/ltt/branches/poly/lttv/lttv/lttv-gui.sh b/ltt/branches/poly/lttv/lttv/lttv-gui.sh
new file mode 100644 (file)
index 0000000..7ed4974
--- /dev/null
@@ -0,0 +1,8 @@
+# -* sh *-
+
+# This is a simple script that starts lttv with default GUI modules
+# Mathieu Desnoyers 15-09-2005
+
+$0.real -m guievents -m guifilter -m guicontrolflow -m guistatistics \
+    -m guitracecontrol $*
+
diff --git a/ltt/branches/poly/lttv/lttv/lttv.sh b/ltt/branches/poly/lttv/lttv/lttv.sh
new file mode 100644 (file)
index 0000000..a7d7dc3
--- /dev/null
@@ -0,0 +1,14 @@
+# -* sh *-
+
+# This is a simple script that starts lttv with no modules :
+# For batch mode.
+# Mathieu Desnoyers 15-09-2005
+
+if [ x"$*" = x"" ]; then
+  echo "This is a wrapper around $0.real for convenience purposes"
+  echo "What you really want is maybe the lttv-gui command ?"
+  echo
+  $0.real --help
+else
+  $0.real $*
+fi
This page took 0.041337 seconds and 4 git commands to generate.