While testing the latest version of plplot I noticed that the dependencies for the java library plplot.jar are not right. I've partially fixed it, but I'd like some cmake advice on the complete fix.
It's somewhat complicated because of bugs in some versions of jar we have to make the whole library in one go, even though it contains files compiled in bindings/java and examples/java. In bindings/java/CMakeLists.txt we have a custom target plplot_core which depends on the relevant .class files and a custom command to build each .class file from the equivalent .java file. In examples/java/CMakeLists.txt we have an equivalent custom target plplot_examples. These work fine and the .class files are updated if the .java files change. Also in example/java/CMakeLists.txt are a custom command to create plplot.jar and a custom target (plplot.jar) which depends on ${CMAKE_CURRENT_BINARY_DIR}/plplot.jar and also has dependencies on the targets plplot_core and plplot_examples. Calling this appears to correctly call the targets plplot_core and plplot_examples, which in turn update the classes. The .jar file is not updated though. I think what is missing is a dependency of ${CMAKE_CURRENT_BINARY_DIR}/plplot.jar on all the .class files. I have added in this dependency for the plplot/examples/*.class files, since I have a list of them in example/java/CMakeLists.txt. Can anyone see a neat way of doing this for the plplot/core/*.class files without duplicating the list in bindings/java/CMakeLists.txt. I thought about having some stamp which is touched when the .class files are rebuilt. I'm not sure how portable that is. Any thoughts? Andrew ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ Plplot-devel mailing list Plplot-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/plplot-devel