On Friday, January 07, 2011 10:58 AM, Noel O'Boyle wrote: >Thanks for the patches, John,
You're welcome. >I the Python patch with one modification; if PYTHON_PREFIX is >specified then DESTDIR is ignored. I assume that this is fine with the >package maintainers. You will do as you think best, but I don't like that change, and I don't think it's wise. These two variables have distinct, non-overlapping purposes. For example, if there were ever a need to put an RPATH into a binary component of the Python extension, or a hardcoded path into the Python module, then you would want it to include the PYTHON_PREFIX, if any, but not the DESTDIR. Furthermore, making an exception for that case leaves the OpenBabel support for DESTDIR inconsistent with convention under some circumstances, and it requires more work in some cases similar to mine by requiring that the same thing needs be specified twice (at least). >I'm still not happy with supporting DESTDIR though (and wish that >CMake had not decided to do so). I would prefer adding staging support >through a CMake configuration variable such as -DDESTDIR=. That could have worked, but I am glad that CMake adopted the existing convention instead of inventing its own. Note also that DESTDIR has other uses than just staged installations. For example, if you maintain a chroot environment then you can use DESTDIR to install to your chroot without building directly there. If you have multiple chroots then with DESTDIR you can install to each of them without reconfiguring or rebuilding anything. Alternatively, if you want to check what's going to be installed before you actually install it, then DESTDIR is just the thing for you, and an install-time decision is exactly what you want. > The main >problem with adding support for a build-time variable, is that we >really need to apply conditional logic at install time, but this does >not seem to be possible with CMake (correct me if wrong). I'm still not much of a CMake guy, and in my limited research I did not find any easy ways to persuade CMake to perform logic at build time. I suspect there are some, however, because CMake Makefiles call back to CMake. I did have to overcome a similar problem, though: to get the DESTDIR variable to be evaluated and interpolated at build time instead of at configuration time. You will see that I managed that by using \$ENV{DESTDIR} in CMakeLists.txt instead of just $ENV{DESTDIR}; at configuration time the former is converted to the latter, and at build time the latter is interpreted as the value of DESTDIR. I'm not seeing a need here to apply conditional logic at build time, however. The standard DESTDIR paradigm is that you just prepend $(DESTDIR) to all the installation paths in your Makefile. If DESTDIR is given during "make install" then the installation paths automatically reflect the specified alternative root; if not, then $(DESTDIR) expands to nothing, and files are installed directly to their final places. Why should the build system otherwise care or do anything differently depending on whether DESTDIR is given? Cheers, John Email Disclaimer: www.stjude.org/emaildisclaimer ------------------------------------------------------------------------------ Gaining the trust of online customers is vital for the success of any company that requires sensitive data to be transmitted over the Web. Learn how to best implement a security strategy that keeps consumers' information secure and instills the confidence they need to proceed with transactions. http://p.sf.net/sfu/oracle-sfdevnl _______________________________________________ OpenBabel-Devel mailing list OpenBabel-Devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/openbabel-devel