[m-dev.] Libraries Idea

Fergus Henderson fjh at cs.mu.OZ.AU
Mon Sep 27 18:18:06 AEST 1999


On 27-Sep-1999, Warwick Harvey <wharvey at cs.monash.edu.au> wrote:
> Anyway, I have a rough cut which seems to work.  You just need to specify in 
> your Mmakefile where you want to install the library, and which grades you 
> wish to install it in:
> 
> 	INSTALL_PREFIX = ...
> 	LIBGRADES = ...
> 
> Then you just do a `mmake lib<foo>.install' and it will do the rest.
> 
> It needs some more polishing and some documentation, etc., but I'll try to 
> find some time one night this week to finish it off.
> 
> One issue is how much of the Mercury installation hierarchy should be 
> mimicked.  E.g. if you set the installation prefix to be, say, 
> `/my/install/dir', should the `lib', `ints' and `modules' directories go in 
> that directory, or should they be in a `lib/mercury' subdirectory?
>
> If you've got a directory just for Mercury libraries and nothing else, the 
> two extra levels of nesting seem a bit silly, but if you're installing into 
> a more general location (e.g. /usr/contrib), then you probably want them.  
> Or if this stuff is generalised a bit further so that executable files, 
> documentation, etc. can also be installed, then you probably want them.

I think that generalizing it so that executable files and documentation
can be installed would be a good idea, so we should plan for that.
This suggests that we should append /lib/mercury to the user-specified
prefix.

However, since it is easy to do, I suggest implementing it so that the user
can specify either, e.g. by using default values of say

	INSTALL_PREFIX=/usr/local/mercury-$(VERSION)
	INSTALL_LIB_PREFIX=$(INSTALL_PREFIX)/lib/mercury

as is currently done in Mmake.common.in (although that uses the name
INSTALL_LIBDIR rather than INSTALL_LIB_PREFIX).
Then the user can override either INSTALL_PREFIX or INSTALL_LIB_PREFIX.
If they override the former, then /lib/mercury will get appended,
if they override the latter, then the directory they specify will be
used directly.

But I would only bother documenting INSTALL_PREFIX.
The extra complication of documenting INSTALL_LIB_PREFIX
is probably not worth the benefit.

Cheers,
	Fergus.

-- 
Fergus Henderson <fjh at cs.mu.oz.au>  |  "I have always known that the pursuit
WWW: <http://www.cs.mu.oz.au/~fjh>  |  of excellence is a lethal habit"
PGP: finger fjh at 128.250.37.3        |     -- the last words of T. S. Garp.
--------------------------------------------------------------------------
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