]> sigrok.org Git - libsigrok.git/commitdiff
Assorted build system fixes for C++/Python/Java bindings.
authorMartin Ling <redacted>
Sat, 19 Jul 2014 15:23:45 +0000 (16:23 +0100)
committerBert Vermeulen <redacted>
Sat, 19 Jul 2014 15:25:37 +0000 (17:25 +0200)
.gitignore
Makefile.am

index 8af73ad11298afee3dcbe0208433dc4fc625f990..49a243aa245e92cc033aa54d77e33ae4e79dcf52 100644 (file)
@@ -60,6 +60,7 @@ bindings/python/sigrok/core/lowlevel.py
 bindings/python/sigrok/core/lowlevel_wrap.c
 bindings/python/sigrok/core/classes.py
 bindings/python/sigrok/core/classes_wrap.cpp
+bindings/python/timestamp
 
 # Files generated by building Java bindings
 *.class
index 1bb8966ecbe233af532d926c3336b63bc3962946..777aff85e6a426e7031a3af95cc4cf3134741c65 100644 (file)
@@ -385,7 +385,7 @@ lib_LTLIBRARIES += bindings/cxx/libsigrokxx.la
 
 bindings_cxx_libsigrokxx_la_SOURCES = bindings/cxx/classes.cpp
 
-bindings_cxx_libsigrokxx_la_LIBADD = -lsigrok $(glibmm_LIBS)
+bindings_cxx_libsigrokxx_la_LIBADD = libsigrok.la $(glibmm_LIBS)
 
 bindings_cxx_libsigrokxx_la_LDFLAGS = $(SR_LIB_LDFLAGS)
 
@@ -412,14 +412,21 @@ CLEAN_EXTRA =
 
 if BINDINGS_PYTHON
 
-python-build: bindings/cxx/libsigrokxx.la
-       cd bindings/python && python setup.py build
+PDIR = bindings/python
+
+python-build: $(PDIR)/timestamp
+
+$(PDIR)/timestamp: bindings/cxx/libsigrokxx.la $(PDIR)/sigrok/core/classes.i
+       cd $(PDIR) && python setup.py clean --all
+       cd $(PDIR) && python setup.py build
+       touch $(PDIR)/timestamp
 
 python-install:
-       cd bindings/python && python setup.py install --prefix $(prefix)
+       cd $(PDIR) && python setup.py install --prefix $(prefix)
 
 python-clean:
-       cd bindings/python && python setup.py clean --all
+       cd $(PDIR) && python setup.py clean --all
+       rm -f $(PDIR)/timestamp
 
 BUILD_EXTRA += python-build
 INSTALL_EXTRA += python-install
@@ -460,10 +467,10 @@ java-install:
        $(INSTALL) $(JJAR) -t $(datadir)/java
 
 java-clean:
-       rm $(JSRC)
-       rm $(JDIR)/$(JPKG)/*.class
-       rm $(JJAR)
-       rm $(JLIB)
+       rm -f $(JSRC)
+       rm -f $(JDIR)/$(JPKG)/*.class
+       rm -f $(JJAR)
+       rm -f $(JLIB)
 
 BUILD_EXTRA += java-build
 INSTALL_EXTRA += java-install
@@ -473,7 +480,7 @@ endif
 
 all-local: $(BUILD_EXTRA)
 install-exec-local: $(INSTALL_EXTRA)
-clean-extra: $(CLEAN_EXTRA)
+clean-local: $(CLEAN_EXTRA)
 
 MAINTAINERCLEANFILES = ChangeLog