[m-dev.] FINAL_INSTALL_PREFIX

Michael Wybrow mjwybrow at cs.mu.OZ.AU
Mon Nov 22 10:10:36 AEDT 2004


On Fri, 19 Nov 2004, Ian MacLarty wrote:
>
> When I recently changed the default value of the 
> --shlib-linker-install-name-path (which is used to set the -install-name 
> linker option for Darwin shared libs) to the value of 
> FINAL_INSTALL_MERC_LIB_DIR instead of INSTALL_MERC_LIB_DIR (as requested 
> by Michael Wybrow), building of user shared libraries on Mac OS X no 
> longer works as described in the user guide.
>
> This is because FINAL_INSTALL_MERC_LIB_DIR comes from 
> FINAL_INSTALL_PREFIX which is not documented in the user guide, and 
> INSTALL_MERC_LIB_DIR comes from INSTALL_PREFIX which is documented in 
> the user guide.  The user guide says to set the INSTALL_PREFIX to the 
> path where the libraries will be installed, but no mention is made of 
> the FINAL_INSTALL_PREFIX.
>
> Is FINAL_INSTALL_PREFIX meant to be used by users or is it just specific 
> to the Mercury configuration scripts?  Surely if its Mercury specific 
> then the default value of --shlib-linker-install-name-path should be the 
> value of INSTALL_MERC_LIB_DIR?  Otherwise if FINAL_INSTALL_PREFIX is a 
> variable the user should be aware of then it should be documented in the 
> user guide and should be used in the example Mmakefile given in the user 
> guide.

My feeling is that that it is the user guide that is at fault -- the build 
process is working correctly at the moment and I can build a fink package 
and have the dylibs work correctly.  But this behaviour is probably only 
going to be used by packagers of the mercury distribution so maybe it does 
not need to be documented in the user guide?

As I understand it, FINAL_INSTALL_PREFIX should only ever be needed by 
packagers who need to `install' mercury to a `fake' install prefix to 
allow a package to be built from its directory tree (this will be 
different from its final installation directory).  For the `make install' 
step they will override the value of INSTALL_PREFIX.  But any hardcoded 
paths need to use the previous INSTALL_PREFIX, which will be 
FINAL_INSTALL_PREFIX.  In most cases these two variables will be the same 
value, its only when it is overridden on the `make install' command line 
that they will differ.

The debian package files use the same trick that I use for fink.  Have a 
look at `mercury/debian/rules':

 	# To build the binary package, we install into ./debian/tmp/usr
 	# However, we have configured as if we are going to install into
 	# /usr, so we need to convince the "make install" target to
 	# install elsewhere.
 	# We override INSTALL_PREFIX to tell it to install to
 	# ./debian/tmp/usr.  Hardcoded paths should be depending on
 	# FINAL_INSTALL_PREFIX  instead, which we leave configured for
 	# /usr.
 	install: build
         	dh_testdir
         	dh_testroot
         	dh_clean -k
         	dh_installdirs
         	make install INSTALL_PREFIX=`pwd`/debian/tmp/usr ;\


Cheers,
Michael
--------------------------------------------------------------------------
mercury-developers mailing list
Post messages to:       mercury-developers at cs.mu.oz.au
Administrative Queries: owner-mercury-developers at cs.mu.oz.au
Subscriptions:          mercury-developers-request at cs.mu.oz.au
--------------------------------------------------------------------------



More information about the developers mailing list