From 591999cadc9648d74f3a06ccd42430ee8f6d80cb Mon Sep 17 00:00:00 2001 From: Mathieu Desnoyers Date: Fri, 16 Dec 2016 17:35:15 +0100 Subject: [PATCH] Fix: babeltrace launch wrapper script MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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 Signed-off-by: Jérémie Galarneau --- configure.ac | 5 ++++- converter/Makefile.am | 23 ++++++++--------------- converter/babeltrace.in | 5 +++++ converter/babeltrace.wrapper.in | 4 ---- 4 files changed, 17 insertions(+), 20 deletions(-) create mode 100755 converter/babeltrace.in delete mode 100755 converter/babeltrace.wrapper.in diff --git a/configure.ac b/configure.ac index 0a257ba8..4d1cbeed 100644 --- a/configure.ac +++ b/configure.ac @@ -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]) diff --git a/converter/Makefile.am b/converter/Makefile.am index 6abe05fa..e6c8dac8 100644 --- a/converter/Makefile.am +++ b/converter/Makefile.am @@ -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 index 00000000..ad99787e --- /dev/null +++ b/converter/babeltrace.in @@ -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 index a32086d6..00000000 --- a/converter/babeltrace.wrapper.in +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/sh - -babeltrace --omit-system-plugin-path --omit-home-plugin-path \ - --plugin-path "@abs_top_builddir@/plugins" ${*} -- 2.34.1