Fix: babeltrace launch wrapper script
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Fri, 16 Dec 2016 16:35:15 +0000 (17:35 +0100)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Sat, 27 May 2017 18:09:08 +0000 (14:09 -0400)
Call babeltrace.bin from wrapper script (not wrapper per se).
Transform the babeltrace.bin program name to babeltrace when installing.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
configure.ac
converter/Makefile.am
converter/babeltrace.in [new file with mode: 0755]
converter/babeltrace.wrapper.in [deleted file]

index 0a257ba8af8ca9aed42a3f4420c2f297725bd7f8..4d1cbeed29908f12cc8db1d67bdcecb7415781d8 100644 (file)
@@ -349,6 +349,9 @@ AC_SUBST(babeltracectfirincludedir)
 babeltracepluginincludedir="${includedir}/babeltrace/plugin"
 AC_SUBST(babeltracepluginincludedir)
 
+program_transform_name='s/babeltrace[\].bin/babeltrace/g'
+AC_SUBST(program_transform_name)
+
 # check for Doxygen
 AC_ARG_ENABLE(
   [api-doc],
@@ -429,7 +432,7 @@ AC_CONFIG_FILES([
        babeltrace-ctf.pc
 ])
 
-AC_CONFIG_FILES([converter/babeltrace.wrapper], [chmod +x converter/babeltrace.wrapper])
+AC_CONFIG_FILES([converter/babeltrace], [chmod +x converter/babeltrace])
 AC_CONFIG_FILES([tests/lib/test_ctf_writer_complete], [chmod +x tests/lib/test_ctf_writer_complete])
 AC_CONFIG_FILES([tests/lib/test_seek_big_trace], [chmod +x tests/lib/test_seek_big_trace])
 AC_CONFIG_FILES([tests/lib/test_seek_empty_packet], [chmod +x tests/lib/test_seek_empty_packet])
index 6abe05fac01b1478a80a27ff80235f1c8edc9f38..e6c8dac8a88ddb205031570fc604c886b9999b57 100644 (file)
@@ -2,9 +2,9 @@ AM_CFLAGS = $(PACKAGE_CFLAGS) -I$(top_srcdir)/include \
                -DINSTALL_LIBDIR=\"$(libdir)\"
 AM_LDFLAGS = -lpopt
 
-bin_PROGRAMS = babeltrace babeltrace-log
+bin_PROGRAMS = babeltrace.bin babeltrace-log
 
-babeltrace_SOURCES = \
+babeltrace_bin_SOURCES = \
        babeltrace.c \
        babeltrace-cfg.c \
        babeltrace-cfg.h
@@ -12,8 +12,8 @@ babeltrace_SOURCES = \
 # -Wl,--no-as-needed is needed for recent gold linker who seems to think
 # it knows better and considers libraries with constructors having
 # side-effects as dead code.
-babeltrace_LDFLAGS = -Wl, $(LD_NO_AS_NEEDED), -export-dynamic
-babeltrace_LDADD = \
+babeltrace_bin_LDFLAGS = -Wl, $(LD_NO_AS_NEEDED), -export-dynamic
+babeltrace_bin_LDADD = \
        $(top_builddir)/lib/libbabeltrace.la \
        $(top_builddir)/formats/ctf/libbabeltrace-ctf.la \
        $(top_builddir)/compat/libcompat.la \
@@ -23,11 +23,11 @@ babeltrace_LDADD = \
        $(top_builddir)/formats/lttng-live/libbabeltrace-lttng-live.la
 
 if ENABLE_DEBUG_INFO
-babeltrace_LDADD += $(top_builddir)/lib/libdebug-info.la
+babeltrace_bin_LDADD += $(top_builddir)/lib/libdebug-info.la
 endif
 
 if BUILT_IN_PLUGINS
-babeltrace_LDFLAGS += -Wl,--whole-archive,$(top_builddir)/plugins/ctf/.libs/libbabeltrace-plugin-ctf.a,$(top_builddir)/plugins/text/.libs/libbabeltrace-plugin-ctf-text.a,$(top_builddir)/plugins/muxer/.libs/libbabeltrace-plugin-muxer.a,$(top_builddir)/plugins/writer/.libs/libbabeltrace-plugin-ctf-writer.a,--no-whole-archive
+babeltrace_bin_LDFLAGS += -Wl,--whole-archive,$(top_builddir)/plugins/ctf/.libs/libbabeltrace-plugin-ctf.a,$(top_builddir)/plugins/text/.libs/libbabeltrace-plugin-ctf-text.a,$(top_builddir)/plugins/muxer/.libs/libbabeltrace-plugin-muxer.a,$(top_builddir)/plugins/writer/.libs/libbabeltrace-plugin-ctf-writer.a,--no-whole-archive
 endif
 
 babeltrace_log_SOURCES = babeltrace-log.c
@@ -46,14 +46,7 @@ endif
 
 if BABELTRACE_BUILD_WITH_MINGW
 babeltrace_log_LDADD += -lrpcrt4 -lintl -liconv -lole32 -lpopt -lpthread
-babeltrace_LDADD += -lrpcrt4 -lintl -liconv -lole32 -lpopt -lpthread
+babeltrace_bin_LDADD += -lrpcrt4 -lintl -liconv -lole32 -lpopt -lpthread
 endif
 
-check_SCRIPTS = babeltrace.wrapper
-
-all-local: $(PROGRAMS)
-       mv babeltrace babeltrace.libtool
-       cp babeltrace.wrapper babeltrace
-
-clean-local:
-       rm -f babeltrace.libtool
+check_SCRIPTS = babeltrace
diff --git a/converter/babeltrace.in b/converter/babeltrace.in
new file mode 100755 (executable)
index 0000000..ad99787
--- /dev/null
@@ -0,0 +1,5 @@
+#!/bin/sh
+
+@abs_top_builddir@/converter/babeltrace.bin \
+               --omit-system-plugin-path --omit-home-plugin-path \
+               --plugin-path "@abs_top_builddir@/plugins" ${*}
diff --git a/converter/babeltrace.wrapper.in b/converter/babeltrace.wrapper.in
deleted file mode 100755 (executable)
index a32086d..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/bin/sh
-
-babeltrace --omit-system-plugin-path --omit-home-plugin-path \
-               --plugin-path "@abs_top_builddir@/plugins" ${*}
This page took 0.026903 seconds and 4 git commands to generate.