X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=src%2Fbindings%2Fpython%2Fbt2%2FMakefile.am;h=0e9b9a3f3de2cdfb0b867f0688e3321b70d3dc16;hb=5778eeac4ed9f124038b93a22917111428ee0ce2;hp=75a656897caa474c157efe84f57e8ac027db2507;hpb=71e8e5c5b3784d0ec462f443d6bae629bb942fc2;p=babeltrace.git diff --git a/src/bindings/python/bt2/Makefile.am b/src/bindings/python/bt2/Makefile.am index 75a65689..0e9b9a3f 100644 --- a/src/bindings/python/bt2/Makefile.am +++ b/src/bindings/python/bt2/Makefile.am @@ -17,6 +17,7 @@ SWIG_INTERFACE_FILES = \ bt2/native_bt_component_class.i.h \ bt2/native_bt_connection.i \ bt2/native_bt_error.i \ + bt2/native_bt_error.i.h \ bt2/native_bt_event.i \ bt2/native_bt_event_class.i \ bt2/native_bt_field.i \ @@ -31,6 +32,8 @@ SWIG_INTERFACE_FILES = \ bt2/native_bt_message.i \ bt2/native_bt_message_iterator.i \ bt2/native_bt_message_iterator.i.h \ + bt2/native_bt_mip.i \ + bt2/native_bt_mip.i.h \ bt2/native_bt_packet.i \ bt2/native_bt_plugin.i \ bt2/native_bt_plugin.i.h \ @@ -71,6 +74,7 @@ STATIC_BINDINGS_DEPS = \ bt2/logging.py \ bt2/message.py \ bt2/message_iterator.py \ + bt2/mip.py \ bt2/object.py \ bt2/packet.py \ bt2/plugin.py \ @@ -91,15 +95,33 @@ STATIC_LIBRARIES_DEPS = \ $(top_builddir)/src/autodisc/libbabeltrace2-autodisc.la \ $(top_builddir)/src/logging/libbabeltrace2-logging.la \ $(top_builddir)/src/common/libbabeltrace2-common.la \ - $(top_builddir)/src/py-common/libbabeltrace2-py-common.la + $(top_builddir)/src/py-common/libbabeltrace2-py-common.la \ + $(top_builddir)/src/string-format/libbabeltrace2-string-format.la GENERATED_BINDINGS_DEPS = \ bt2/native_bt.c \ bt2/version.py \ setup.py +# 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. +WARN_CFLAGS = -Wno-shadow + +WARN_CFLAGS += -Wno-null-dereference + +# Python 3.8 with SWIG 4.0.2 generates a deprecated warning for 'tp_print' +# and in general there is not much we can do about deprecations in generated +# code. +WARN_CFLAGS += -Wno-deprecated-declarations + +# Python 3.11 + gcc 12.2.0 gave warnings of this kind in Python.h. +WARN_CFLAGS += -Wno-redundant-decls + BUILD_FLAGS=CC="$(CC)" \ - CFLAGS="$(GLIB_CFLAGS) $(AM_CFLAGS) $(CFLAGS)" \ + CFLAGS="$(GLIB_CFLAGS) $(AM_CFLAGS) $(CFLAGS) $(WARN_CFLAGS)" \ CPPFLAGS="$(AM_CPPFLAGS) $(CPPFLAGS) -I$(srcdir)/bt2" \ LDFLAGS="$(AM_LDFLAGS) $(LDFLAGS) $(GLIB_LIBS) $(LIBS)" @@ -123,10 +145,12 @@ swig_verbose_ = $(swig_verbose_@AM_DEFAULT_V@) swig_verbose_0 = @echo " SWIG " $@; $(builddir)/bt2/native_bt.c: $(SWIG_INTERFACE_FILES) - $(swig_verbose)$(SWIG) -python -I"$(top_srcdir)/include" -o "$@" "$<" + $(swig_verbose)$(SWIG) -MD -python -I"$(top_srcdir)/include" -o "$@" "$<" + +-include bt2/native_bt.d install-exec-local: build-python-bindings.stamp - @opts="--prefix=$(prefix) --record $(INSTALLED_FILES) --verbose --no-compile $(DISTSETUPOPTS)"; \ + @opts="--prefix=$(prefix) --exec-prefix=$(exec_prefix) --record $(INSTALLED_FILES) --verbose --no-compile $(DISTSETUPOPTS)"; \ if [ "$(DESTDIR)" != "" ]; then \ opts="$$opts --root=$(DESTDIR)"; \ fi; \ @@ -155,4 +179,9 @@ uninstall-local: EXTRA_DIST = $(STATIC_BINDINGS_DEPS) $(SWIG_INTERFACE_FILES) $(STATIC_NATIVE_LIB_SRCS) # clean: generated C and Python files (by SWIG) -CLEANFILES = bt2/native_bt.py bt2/native_bt.c build-python-bindings.stamp copy-static-deps.stamp +CLEANFILES = \ + build-python-bindings.stamp \ + bt2/native_bt.c \ + bt2/native_bt.d \ + bt2/native_bt.py \ + copy-static-deps.stamp