When building with '--enable-built-in-plugins' we use some linker
trickery to embed the plugins in the cli binary. The automake build
system is however unaware of this dependency and won't trigger a
relinking when a plugin is modified.
Use the EXTRA_*_DEPENDENCIES [1] variable to add explicit dependencies
between the cli binary and each embedded plugin.
[1] https://www.gnu.org/software/automake/manual/html_node/Program-and-Library-Variables.html
Fixes #1237
Change-Id: Ib989edcc083c55509f4a990d90948761a18fc1d0
Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Reviewed-on: https://review.lttng.org/c/babeltrace/+/7464
Tested-by: jenkins <jenkins@lttng.org>
Reviewed-by: Philippe Proulx <eeppeliteloop@gmail.com>
# side-effects as dead code.
babeltrace2_bin_LDFLAGS = $(AM_LDFLAGS) $(LD_NO_AS_NEEDED)
# side-effects as dead code.
babeltrace2_bin_LDFLAGS = $(AM_LDFLAGS) $(LD_NO_AS_NEEDED)
+EXTRA_babeltrace2_bin_DEPENDENCIES =
+
# Add all the convenience libraries used by Babeltrace plugins and the
# library. They will be used when embedding plugins (--enable-built-in-plugins),
# otherwise we're looking after multiple definitions of the same symbols if
# Add all the convenience libraries used by Babeltrace plugins and the
# library. They will be used when embedding plugins (--enable-built-in-plugins),
# otherwise we're looking after multiple definitions of the same symbols if
babeltrace2_bin_LDFLAGS += $(call pluginarchive,text)
babeltrace2_bin_LDFLAGS += $(call pluginarchive,utils)
babeltrace2_bin_LDFLAGS += $(call pluginarchive,text)
babeltrace2_bin_LDFLAGS += $(call pluginarchive,utils)
+EXTRA_babeltrace2_bin_DEPENDENCIES += \
+ $(PLUGINS_PATH)/ctf/babeltrace-plugin-ctf.la \
+ $(PLUGINS_PATH)/text/babeltrace-plugin-text.la \
+ $(PLUGINS_PATH)/utils/babeltrace-plugin-utils.la
+
if ENABLE_DEBUG_INFO
babeltrace2_bin_LDFLAGS += $(call pluginarchive,lttng-utils)
babeltrace2_bin_LDADD += $(ELFUTILS_LIBS)
if ENABLE_DEBUG_INFO
babeltrace2_bin_LDFLAGS += $(call pluginarchive,lttng-utils)
babeltrace2_bin_LDADD += $(ELFUTILS_LIBS)
+
+EXTRA_babeltrace2_bin_DEPENDENCIES += \
+ $(PLUGINS_PATH)/lttng-utils/babeltrace-plugin-lttng-utils.la
babeltrace2_LDFLAGS = $(babeltrace2_bin_LDFLAGS)
babeltrace2_LDADD = $(babeltrace2_bin_LDADD)
babeltrace2_CFLAGS = $(AM_CFLAGS) -DBT_SET_DEFAULT_IN_TREE_CONFIGURATION
babeltrace2_LDFLAGS = $(babeltrace2_bin_LDFLAGS)
babeltrace2_LDADD = $(babeltrace2_bin_LDADD)
babeltrace2_CFLAGS = $(AM_CFLAGS) -DBT_SET_DEFAULT_IN_TREE_CONFIGURATION
+EXTRA_babeltrace2_DEPENDENCIES = $(EXTRA_babeltrace2_bin_DEPENDENCIES)