Hello All,

Today I have been looking into DESTDIR usage for the other language bindings 
supported by OpenBabel.  I am reporting my findings for discussion here before 
filing any more bug reports on the topic:

1) Perl -- The OpenBabel installation rules for the Perl module do not support 
DESTDIR, but the MakeMaker-generated Makefile they rely upon does.  A one-line 
change in scripts/CMakeLists.txt can enable DESTDIR for the Perl module:
-      install(CODE "execute_process(COMMAND make install WORKING_DIRECTORY 
${openbabel_BINARY_DIR}/scripts/perl)")
+      install(CODE "execute_process(COMMAND make install 
DESTDIR=\$ENV{DESTDIR} WORKING_DIRECTORY ${openbabel_BINARY_DIR}/scripts/perl)")

2) Ruby -- The mkmf-generated Makefile for the Ruby binding supports DESTDIR, 
but OpenBabel's installation rules have coopted it for their own purposes.  The 
rules as written don't achieve the result described in the installation docs, 
however.  To get that, the generation of the Makefile needs to be managed.  
That is, the install location needs to be configured into the generated 
Makefile.  If that were done then DESTDIR would be available for its 
conventional purpose, and the rules for the Ruby bindings would then also be 
more consistent with those for the Perl and Python bindings.

3) Java -- There does not currently seem to be any installation rule for the 
Java bindings, and they do get installed by "make install".  Furthermore, it 
appears that the 2.3.0 source release contains a pre-compiled copy of the Java 
bindings, newer than the sources, thus they appear up to date and do not get 
(freshly) built, either.  Because the bindings rely on JNI, I do not think it's 
safe to rely on a pre-built JAR.  It looks like maybe it would get built if I 
turned on SWIG; I haven't tried that yet.

4) C# -- I don't really care about C#, but it looks like those bindings are in 
the same boat as the Java ones (there is no install rule defined, and a 
pre-built DLL is included in the source distribution).  DESTDIR is not relevant 
here, I don't think.


Overall, it looks like all the installers and Makefile generators involved 
(CMake, distutils, MakeMaker, mkmf) support the DESTDIR convention or an 
equivalent, but the DESTDIR value provided to the top-level "make install" is 
not being passed on for installation of the language bindings.  For the most 
part it looks like there are easy fixes, but I think the Ruby module's 
integration into the overall build system probably needs a bit more work.  I 
may devote some attention to that if there is interest; otherwise, it would be 
easier for me to just patch the build file to do exactly what I want.


Regards,

John

--
John C. Bollinger, Ph.D.
Department of Structural Biology
St. Jude Children's Research Hospital




Email Disclaimer:  www.stjude.org/emaildisclaimer


------------------------------------------------------------------------------
Learn how Oracle Real Application Clusters (RAC) One Node allows customers
to consolidate database storage, standardize their database environment, and, 
should the need arise, upgrade to a full multi-node Oracle RAC database 
without downtime or disruption
http://p.sf.net/sfu/oracle-sfdevnl
_______________________________________________
OpenBabel-Devel mailing list
OpenBabel-Devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openbabel-devel

Reply via email to