[m-rev.] for preliminary review: post-installation addition of extra library grades

Paul Bone paul at bone.id.au
Mon Sep 15 11:41:19 AEST 2014


On Tue, Sep 09, 2014 at 01:57:39PM +1000, Julien Fischer wrote:
>
> For preliminary review:
>
> (This almost certainly does not work on Windows at the moment.  Also,
> attempting to add extra grades to a cross compiler probably won't work
> either.)
>
> ---------------------------
>
> Support post-installation addition of extra library grades.
>
> A feature that has often been requested is the ability to add extra library
> grades to an existing Mercury installation without requiring a re-install of
> the entire system.  In the past doing this has been awkward because the set of
> library grades is hardcoded into various configuration files.  This is no
> longer true for mmc --make, which now detects the set of installed library
> grades at runtime.  (It is still true for mmake, but that probably doesn't matter.)
>
> This change adds a new option to configure script,
> --enable-extra-grade-install.  When invoked with this option, the configure
> script will set up the source tree to build and install only additional library
> grades, not the entire system.  An example of the process is:
>
>    $ ./configure --enable-extra-grade-install
>    $ mmake LIBGRADES="java csharp" install
>
> The above causes the java and csharp grades to be added to the existing
> installation.  (This is no different to what the developers of Mercury already
> do in this situation except that it removes the need to edit Mmakefiles by
> hand and makes the whole thing a bit more user-friendly.)
>
> configure.ac:
> 	Add the new option.  If it is enabled then:
> 	- query the installed Mercury compiler for which C compiler to use.
> 	- use the install prefix of the installed compiler by default.
> 	- set the set of grades to be installed to empty.

What about other options that may have been specified the first time Mercury
was installed.  for exmaple someone might use a prefix of /foo/bar, but a
libdir of /foo/baz/lib/.  Options like this will need to be used.

Some things such as versions of C libraries that are installed should
however be re-detected.


> Mmakefile:
> 	If the source tree was configure to install extra library grades then:
> 	- disable the default target -- print a message about this if it is invoked.
> 	- make the install target a synonym for install_grades.
> 	- remove the dependency of install_grades on install_main.

s/configure/configured/

The rest seems okay modulo the things you mentioned above.


-- 
Paul Bone



More information about the reviews mailing list