X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=blobdiff_plain;f=extras%2Fbindings%2Fswig%2Fpython%2FMakefile.am;h=209f5bd61d4293a0c740b74ccbd4a8d22b510a11;hp=6e7baa69d86fc8eb3ef6bc576859d62ef0607a9a;hb=2d44f8b36dc75971082d70f3f4bd0cac523c2eef;hpb=5d2e1e66a968d9e555f9b8b00d0589ebfaf3de32 diff --git a/extras/bindings/swig/python/Makefile.am b/extras/bindings/swig/python/Makefile.am index 6e7baa69d..209f5bd61 100644 --- a/extras/bindings/swig/python/Makefile.am +++ b/extras/bindings/swig/python/Makefile.am @@ -1,8 +1,16 @@ +# SPDX-License-Identifier: GPL-2.0-only + lttng.i: lttng.i.in - sed "s/LTTNG_VERSION_STR/LTTng $(PACKAGE_VERSION)/g" lttng.i + $(SED) "s/LTTNG_VERSION_STR/LTTng $(PACKAGE_VERSION)/g" < $(srcdir)/lttng.i.in >lttng.i + +# Some versions of SWIG (like 3.0.12) generate code where a parameter called +# `swig_this` shadows a global of the same name. Later versions (like 4.0.1) +# have renamed this global to `Swig_This_global`. +# +# Disable -Wshadow for that file. +AM_CFLAGS += -Wno-shadow -AM_CFLAGS = -I$(PYTHON_INCLUDE) -I$(top_srcdir)/lib/lttng-ctl -I../common \ - $(BUDDY_CFLAGS) +AM_CPPFLAGS += $(PYTHON_INCLUDE) EXTRA_DIST = lttng.i.in nodist_python_PYTHON = lttng.py @@ -12,8 +20,9 @@ MAINTAINERCLEANFILES = lttng_wrap.c lttng.py nodist__lttng_la_SOURCES = lttng_wrap.c _lttng_la_LDFLAGS = -module -_lttng_la_LIBADD = $(top_srcdir)/src/lib/lttng-ctl/liblttng-ctl.la \ - $(top_srcdir)/src/common/sessiond-comm/libsessiond-comm.la +_lttng_la_LIBADD = $(top_builddir)/src/lib/lttng-ctl/liblttng-ctl.la \ + $(top_builddir)/src/common/sessiond-comm/libsessiond-comm.la \ + $(top_builddir)/src/common/libcommon.la lttng_wrap.c: lttng.i $(SWIG) -python -I. -I$(top_srcdir)/src/common/sessiond-comm lttng.i