+PDIR = bindings/python
+PDOC = bindings/python/sigrok/core/doc.i
+
+$(PDOC): bindings/swig/doc.py $(CPPXMLDOC)
+ $(AM_V_at)test -d $(PDIR)/sigrok/core || $(MKDIR_P) $(PDIR)/sigrok/core
+ $(AM_V_GEN)$(PYTHON) $< python $(CPPXMLDOC) > $@
+
+python-build: $(PDIR)/timestamp
+
+python-quietclean:
+ $(AM_V_at)cd $(PDIR) && $(PYTHON) $(abs_srcdir)/$(PDIR)/setup.py --quiet clean --all 3>&1 1>&2 2>&3 \
+ | grep -v "can.t clean it"; true
+
+$(PDIR)/timestamp: bindings/cxx/libsigrokcxx.la $(PDIR)/sigrok/core/classes.i \
+ bindings/swig/classes.i $(PDOC) $(library_include_HEADERS)
+ $(AM_V_at)$(MAKE) python-quietclean
+ $(AM_V_GEN)cd $(PDIR) && $(PYTHON) $(abs_srcdir)/$(PDIR)/setup.py --quiet build 3>&1 1>&2 2>&3 \
+ | grep -v "command line option.*Wstrict-prototypes"; true
+ $(AM_V_at)touch $(PDIR)/timestamp