swig: use auto-generated dependencies to refresh generated files when needed
authorAndreas Oberritter <obi@opendreambox.org>
Mon, 8 Nov 2010 14:00:11 +0000 (15:00 +0100)
committerAndreas Oberritter <obi@opendreambox.org>
Tue, 16 Nov 2010 16:15:39 +0000 (17:15 +0100)
lib/python/Makefile.am

index ebd77e2d4bae2a20f4912c1b3ede7da322adb993..cfadc69b613e92ca71d20d8643670577066c8fd4 100644 (file)
@@ -19,7 +19,7 @@ pythoninclude_HEADERS = \
        swig.h
 
 nodist_libenigma_python_a_SOURCES = \
-       enigma_python_wrap.cxx
+       enigma_python.cpp
 
 noinst_PYTHON = \
        enigma_py_patcher.py
@@ -27,13 +27,16 @@ noinst_PYTHON = \
 EXTRA_DIST = \
        enigma_python.i
 
-enigma_python_wrap.cxx: $(srcdir)/enigma_python.i
-       $(AM_V_GEN)$(SWIG) $(AX_SWIG_PYTHON_OPT) -I$(top_srcdir) -O -nortti -nothreads -o $@ $<
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/enigma_python.Pcpp@am__quote@
+
+.i.cpp:
+       $(AM_V_GEN)$(SWIG) $(AX_SWIG_PYTHON_OPT) -MT $@ -MD -MF $(DEPDIR)/$*.Tpo -I$(top_srcdir) -O -nortti -nothreads -o $@ $<
+       $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Pcpp
        $(AM_V_at)$(PYTHON) $(srcdir)/enigma_py_patcher.py
 
-enigma.py: enigma_python_wrap.cxx
+enigma.py: enigma_python.cpp
 
-CLEANFILES = enigma.py enigma_python_wrap.cxx
+CLEANFILES = enigma.py enigma_python.cpp
 
 installdir = $(pkglibdir)/python