Fix -Wshadow warnings
[babeltrace.git] / src / bindings / python / bt2 / Makefile.am
index ce1058d802d516dfd856be89c013e7ef7b35209c..cc0ded098e8638f9254f9b31e2e72bcfbebadbae 100644 (file)
@@ -7,6 +7,8 @@ INSTALLED_FILES=$(builddir)/installed_files.txt
 
 SWIG_INTERFACE_FILES =                                 \
        bt2/native_bt.i                                 \
+       bt2/native_bt_autodisc.i                        \
+       bt2/native_bt_autodisc.i.h                      \
        bt2/native_bt_bt2_objects.h                     \
        bt2/native_bt_clock_class.i                     \
        bt2/native_bt_clock_snapshot.i                  \
@@ -29,11 +31,14 @@ 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                        \
        bt2/native_bt_port.i                            \
        bt2/native_bt_query_exec.i                      \
+       bt2/native_bt_query_exec.i.h                    \
        bt2/native_bt_stream.i                          \
        bt2/native_bt_stream_class.i                    \
        bt2/native_bt_trace.i                           \
@@ -54,6 +59,7 @@ STATIC_BINDINGS_DEPS =                                        \
        bt2/clock_class.py                              \
        bt2/clock_snapshot.py                           \
        bt2/component.py                                \
+       bt2/component_descriptor.py                     \
        bt2/connection.py                               \
        bt2/error.py                                    \
        bt2/event.py                                    \
@@ -67,6 +73,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                                   \
@@ -84,6 +91,7 @@ STATIC_BINDINGS_DEPS =                                        \
 # 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/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
@@ -93,8 +101,15 @@ GENERATED_BINDINGS_DEPS =   \
        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
+
 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)"
 
@@ -118,7 +133,9 @@ 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)"; \
@@ -150,4 +167,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
This page took 0.024921 seconds and 4 git commands to generate.