From 69937bc8f642ad9aed4e99f902638e0329c7eb7c Mon Sep 17 00:00:00 2001 From: Simon Marchi Date: Sun, 21 Jul 2019 13:05:21 -0400 Subject: [PATCH] Fix: bt2: Make bindings target depend on convenience libraries Three convenience libraries are used to build the bindings' native library. This dependency is not expressed in the Makefile, so if you change one of them and re-run make, the bindings won't be rebuilt, and the changes in that convenience lib won't be taken into account. For example, if you touch src/py-common/.libs/libbabeltrace2-py-common.a and re-run make, the bindings should (but currently don't) get re-built. This patch adds the explicit dependency in the Makefile, so that any change to one of these libs will trigger a rebuild of the bindings. Change-Id: Iea47833b206bcd0f1cc0d3f72975b14fd6eded93 Signed-off-by: Simon Marchi Reviewed-on: https://review.lttng.org/c/babeltrace/+/1736 Tested-by: jenkins Reviewed-by: Michael Jeanson Reviewed-by: Philippe Proulx --- src/bindings/python/bt2/Makefile.am | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/bindings/python/bt2/Makefile.am b/src/bindings/python/bt2/Makefile.am index 0324ed24..158b8ccd 100644 --- a/src/bindings/python/bt2/Makefile.am +++ b/src/bindings/python/bt2/Makefile.am @@ -68,6 +68,13 @@ STATIC_BINDINGS_DEPS = \ bt2/utils.py \ bt2/value.py +# Convenience static libraries on which the Python bindings library depends. +# These are listed in the setup.py(.in) file. +STATIC_LIBRARIES_DEPS = \ + $(top_builddir)/src/logging/libbabeltrace2-logging.la \ + $(top_builddir)/src/common/libbabeltrace2-common.la \ + $(top_builddir)/src/py-common/libbabeltrace2-py-common.la + GENERATED_BINDINGS_DEPS = \ bt2/__init__.py \ bt2/native_bt.c \ @@ -88,7 +95,8 @@ copy-static-deps.stamp: $(addprefix $(srcdir)/, $(STATIC_BINDINGS_DEPS)) fi touch $@ -build-python-bindings.stamp: copy-static-deps.stamp $(GENERATED_BINDINGS_DEPS) $(STATIC_NATIVE_LIB_SRCS) +build-python-bindings.stamp: copy-static-deps.stamp $(GENERATED_BINDINGS_DEPS) \ + $(STATIC_NATIVE_LIB_SRCS) $(STATIC_LIBRARIES_DEPS) $(BUILD_FLAGS) $(PYTHON) $(builddir)/setup.py build --force touch $@ -- 2.34.1