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>
babeltracepluginincludedir="${includedir}/babeltrace/plugin"
AC_SUBST(babeltracepluginincludedir)
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],
# check for Doxygen
AC_ARG_ENABLE(
[api-doc],
-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])
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])
-DINSTALL_LIBDIR=\"$(libdir)\"
AM_LDFLAGS = -lpopt
-DINSTALL_LIBDIR=\"$(libdir)\"
AM_LDFLAGS = -lpopt
-bin_PROGRAMS = babeltrace babeltrace-log
+bin_PROGRAMS = babeltrace.bin babeltrace-log
+babeltrace_bin_SOURCES = \
babeltrace.c \
babeltrace-cfg.c \
babeltrace-cfg.h
babeltrace.c \
babeltrace-cfg.c \
babeltrace-cfg.h
# -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.
# -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 \
$(top_builddir)/lib/libbabeltrace.la \
$(top_builddir)/formats/ctf/libbabeltrace-ctf.la \
$(top_builddir)/compat/libcompat.la \
$(top_builddir)/formats/lttng-live/libbabeltrace-lttng-live.la
if ENABLE_DEBUG_INFO
$(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
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
endif
babeltrace_log_SOURCES = babeltrace-log.c
if BABELTRACE_BUILD_WITH_MINGW
babeltrace_log_LDADD += -lrpcrt4 -lintl -liconv -lole32 -lpopt -lpthread
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
-check_SCRIPTS = babeltrace.wrapper
-
-all-local: $(PROGRAMS)
- mv babeltrace babeltrace.libtool
- cp babeltrace.wrapper babeltrace
-
-clean-local:
- rm -f babeltrace.libtool
+check_SCRIPTS = babeltrace
--- /dev/null
+#!/bin/sh
+
+@abs_top_builddir@/converter/babeltrace.bin \
+ --omit-system-plugin-path --omit-home-plugin-path \
+ --plugin-path "@abs_top_builddir@/plugins" ${*}
+++ /dev/null
-#!/bin/sh
-
-babeltrace --omit-system-plugin-path --omit-home-plugin-path \
- --plugin-path "@abs_top_builddir@/plugins" ${*}