]> sigrok.org Git - libsigrok.git/commitdiff
Additional build system fixes for C++/Python/Java bindings.
authorMartin Ling <redacted>
Sat, 19 Jul 2014 16:05:29 +0000 (17:05 +0100)
committerBert Vermeulen <redacted>
Sat, 19 Jul 2014 16:06:52 +0000 (18:06 +0200)
.gitignore
Makefile.am

index 49a243aa245e92cc033aa54d77e33ae4e79dcf52..c7d865864a6ddc9be9617edf9949feadca58ebc2 100644 (file)
@@ -47,6 +47,7 @@ Makefile.in
 bindings/cxx/libsigrok.xml
 bindings/cxx/include/libsigrok/enums.hpp
 bindings/cxx/enums.cpp
+bindings/cxx/enums.timestamp
 
 # Files generated by building Python bindings
 *.pyc
index 777aff85e6a426e7031a3af95cc4cf3134741c65..6a6668c12a59aa90d702b8673bec1b59534bc8a4 100644 (file)
@@ -379,6 +379,10 @@ tests_check_main_LDADD = $(top_builddir)/libsigrok.la @check_LIBS@
 
 endif
 
+BUILD_EXTRA =
+INSTALL_EXTRA =
+CLEAN_EXTRA =
+
 if BINDINGS_CXX
 
 lib_LTLIBRARIES += bindings/cxx/libsigrokxx.la
@@ -395,20 +399,30 @@ library_include_HEADERS += \
 
 pkgconfig_DATA += bindings/cxx/libsigrokxx.pc
 
-bindings/cxx/classes.lo: bindings/cxx/enums.cpp
+bindings/cxx/libsigrok.xml: include/libsigrok/libsigrok.h
+       gccxml $(CFLAGS) -DGLIB_DISABLE_DEPRECATION_WARNINGS $< -fxml=$@
+
+bindings/cxx/enums.cpp: bindings/cxx/enums.timestamp
+
+bindings/cxx/include/libsigrok/enums.hpp: bindings/cxx/enums.timestamp
 
-bindings/cxx/enums.cpp: bindings/cxx/enums.py bindings/cxx/libsigrok.xml \
+bindings/cxx/enums.timestamp: bindings/cxx/enums.py bindings/cxx/libsigrok.xml \
                bindings/cxx/ConfigKey_methods.cpp bindings/cxx/QuantityFlag_methods.cpp
        python $<
+       touch $@
 
-bindings/cxx/libsigrok.xml: include/libsigrok/libsigrok.h
-       gccxml $(CFLAGS) -DGLIB_DISABLE_DEPRECATION_WARNINGS $< -fxml=$@
+bindings/cxx/classes.lo: bindings/cxx/classes.cpp bindings/cxx/enums.cpp \
+               $(library_include_HEADERS)
 
-endif
+cxx-clean:
+       rm -f bindings/cxx/libsigrok.xml
+       rm -f bindings/cxx/enums.cpp
+       rm -f bindings/cxx/include/libsigrok/enums.hpp
+       rm -f bindings/cxx/enums.timestamp
 
-BUILD_EXTRA =
-INSTALL_EXTRA =
-CLEAN_EXTRA =
+CLEAN_EXTRA += cxx-clean
+
+endif
 
 if BINDINGS_PYTHON
 
@@ -416,7 +430,8 @@ PDIR = bindings/python
 
 python-build: $(PDIR)/timestamp
 
-$(PDIR)/timestamp: bindings/cxx/libsigrokxx.la $(PDIR)/sigrok/core/classes.i
+$(PDIR)/timestamp: bindings/cxx/libsigrokxx.la $(PDIR)/sigrok/core/classes.i \
+               $(library_include_HEADERS)
        cd $(PDIR) && python setup.py clean --all
        cd $(PDIR) && python setup.py build
        touch $(PDIR)/timestamp
@@ -445,7 +460,7 @@ JJAR = $(JDIR)/sigrok-core.jar
 
 java-build: $(JJAR) $(JLIB)
 
-$(JSRC): $(JINT) bindings/swig/classes.i
+$(JSRC): $(JINT) bindings/swig/classes.i $(library_include_HEADERS)
        swig -c++ -java -package org.sigrok.core.classes \
                -Iinclude -Ibindings/cxx/include \
                -outdir $(JDIR)/$(JPKG) $(JINT)
@@ -454,7 +469,7 @@ $(JJAR): $(JSRC) $(JDIR)/$(JPKG)/*.java
        $(JAVAC) -sourcepath $(JDIR) $(JDIR)/$(JPKG)/*.java
        jar cf $(JJAR) -C $(JDIR) $(JPKG)
 
-$(JLIB): $(JSRC) bindings/cxx/libsigrokxx.la
+$(JLIB): $(JSRC) bindings/cxx/libsigrokxx.la $(library_include_HEADERS)
        $(CXX) $(CXXFLAGS) -L.libs -Lbindings/cxx/.libs \
                -fno-strict-aliasing -fPIC -shared \
                $(JDIR)/$(JPKG)/classes_wrap.cxx -lsigrokxx \