[ismrmrd] 193/281: fixing build dependencies for Java API/docs

Ghislain Vaillant ghisvail-guest at moszumanska.debian.org
Wed Jan 14 20:01:13 UTC 2015


This is an automated email from the git hooks/post-receive script.

ghisvail-guest pushed a commit to annotated tag ismrmrd0.5
in repository ismrmrd.

commit 3e9b42bd5f4816c0ecb228e8102e2ff47674db97
Author: Joseph Naegele <naegelejd at mail.nih.gov>
Date:   Thu Dec 5 13:36:31 2013 -0500

    fixing build dependencies for Java API/docs
    
    now the Java XML Header API and docs should be re-generated
    and re-built if the make_jar.sh script is modified.
---
 bindings/java/CMakeLists.txt | 21 +++++++++++++--------
 bindings/java/make_jar.sh.in |  3 ---
 2 files changed, 13 insertions(+), 11 deletions(-)

diff --git a/bindings/java/CMakeLists.txt b/bindings/java/CMakeLists.txt
index d0df47e..8778a55 100644
--- a/bindings/java/CMakeLists.txt
+++ b/bindings/java/CMakeLists.txt
@@ -13,26 +13,31 @@ set_source_files_properties(${SWIG_SOURCES} PROPERTIES CPLUSPLUS ON)
 swig_add_module(jismrmrd java ${SWIG_SOURCES})
 swig_link_libraries(jismrmrd ${HDF5_LIBRARIES} ${Boost_LIBRARIES})
 
-## TODO: not use a shell script
+#### ISMRMRD XML Header Java library ####
 configure_file(make_jar.sh.in make_jar.sh @ONLY)
-set_source_files_properties(ismrmrd.jar PROPERTIES GENERATED true)
+
+set(JAVADOC_OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/doc")
+set(JAVA_OUTPUTS "${CMAKE_CURRENT_BINARY_DIR}/ismrmrd.jar" ${JAVADOC_OUTPTU})
+
+## TODO: not use a shell script... it breaks 'make'
 add_custom_command(
-    TARGET jismrmrd
-    POST_BUILD
-    WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
-    COMMENT "Compiling java files and creating jar" VERBATIM
+    OUTPUT ${JAVA_OUTPUTS}
+    DEPENDS "${CMAKE_CURRENT_BINARY_DIR}/make_jar.sh"
+    VERBATIM
+    COMMENT "Compiling java files, building jar, generating API docs"
     COMMAND cp ${CMAKE_CURRENT_SOURCE_DIR}/JNILibLoader.java
                ${CMAKE_CURRENT_BINARY_DIR}/org/ismrm/ismrmrd/
     COMMAND mkdir -p ${CMAKE_CURRENT_BINARY_DIR}/org/ismrm/ismrmrd/xmlhdr
     COMMAND cp ${CMAKE_CURRENT_SOURCE_DIR}/XMLString.java
                ${CMAKE_CURRENT_BINARY_DIR}/org/ismrm/ismrmrd/xmlhdr/
     COMMAND sh make_jar.sh
-    VERBATIM
+    COMMAND javadoc -quiet -d ${JAVADOC_OUTPUT} -subpackages org.ismrm.ismrmrd.xmlhdr
 )
+add_custom_target(ismrmrdjar ALL DEPENDS ${JAVA_OUTPUTS})
 
 install(TARGETS jismrmrd DESTINATION java)
 install(FILES ${CMAKE_CURRENT_BINARY_DIR}/ismrmrd.jar DESTINATION java)
 
 # Note: the API documentation is only for the XML header, and is installed
 # in ${INSTALL_PREFIX}/matlab/doc
-install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/doc DESTINATION matlab)
+install(DIRECTORY ${JAVADOC_OUTPUT} DESTINATION matlab)
diff --git a/bindings/java/make_jar.sh.in b/bindings/java/make_jar.sh.in
index d23fa2d..fa3b1a7 100755
--- a/bindings/java/make_jar.sh.in
+++ b/bindings/java/make_jar.sh.in
@@ -8,6 +8,3 @@ javac org/ismrm/ismrmrd/xmlhdr/*.java
 
 # Build a big jar
 jar -cvf ismrmrd.jar org/ismrm/ismrmrd/*.class org/ismrm/ismrmrd/xmlhdr/*.class
-
-# Build the java docs only for the XML header API
-javadoc -quiet -d doc -subpackages org.ismrm.ismrmrd.xmlhdr

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/ismrmrd.git



More information about the debian-science-commits mailing list