[m-rev.] (reminder) for review: simplified user's guide on building and using libraries with mmc
Julien Fischer
juliensf at csse.unimelb.edu.au
Thu Mar 1 13:48:11 AEDT 2007
On Thu, 1 Mar 2007, Peter Wang wrote:
> On 2007-03-01, Ondrej Bojar <bojar at csse.unimelb.edu.au> wrote:
>> Julien or Peter (the one from the Mercury office), could you please have a
>> look at this?
>> Thanks, Ondrej.
>
> Not sure if you meant me, but I'll do it.
>
>> Estimated hours taken: 1.5
>>
>> Splitted the section on building and using libraries depending on whether
>> Mmake or 'mmc --make' is used. Added the instructions for 'mmc --make',
>> including instructions on using libraries without installation.
>>
>> doc/user_guide.texi:
>> See above.
>>
>> Index: doc/user_guide.texi
>> ===================================================================
>> RCS file: /home/mercury/mercury1/repository/mercury/doc/user_guide.texi,v
>> retrieving revision 1.511
>> diff -u -r1.511 user_guide.texi
>> --- doc/user_guide.texi 22 Feb 2007 07:07:02 -0000 1.511
>> +++ doc/user_guide.texi 23 Feb 2007 02:05:54 -0000
>> @@ -554,7 +554,7 @@
>> to create directories, by default @samp{mkdir -p}.
>> For @samp{mmc --make} whether to install libraries for static or shared
>> linking can be specified with the @code{LIB_LINKAGES} variable.
>> -For more information, see @ref{Installing libraries}.
>> +For more information, see @ref{Installing libraries with Mmake}.
>
> Do you need a link to "Installing libraries with mmc" as well?
>
>> @vindex LIBGRADES
>> @vindex LIB_LINKAGES
>> @vindex INSTALL
>> @@ -721,7 +721,7 @@
>> @vindex MLLIBS
>> @vindex EXTRA_MLLIBS
>> A list of @samp{-l} options specifying libraries used by the program
>> -(or library) that you are building. @xref{Using libraries}.
>> +(or library) that you are building. @xref{Using libraries with Mmake}.
>
> Ditto.
>
>>
>> @item MLOBJS and EXTRA_MLOBJS
>> @vindex MLOBJS
>> @@ -756,12 +756,12 @@
>> @samp{lib} prefix or extension.
>> For example the library including the files @file{libfoo.a} and
>> @file{foo.init} would be referred to as just @samp{foo}.
>> - at xref{Using libraries}.
>> + at xref{Using libraries with Mmake}.
>
> Ditto.
>
>>
>> @item EXTRA_LIB_DIRS
>> @vindex EXTRA_LIB_DIRS
>> A list of extra Mercury library directory hierarchies to search when
>> -looking for extra libraries. @xref{Using libraries}.
>> +looking for extra libraries. @xref{Using libraries with Mmake}.
>>
>> @item INSTALL_PREFIX
>> @vindex INSTALL_PREFIX
>> @@ -899,9 +899,8 @@
>>
>> @menu
>> * Writing libraries::
>> -* Building libraries::
>> -* Installing libraries::
>> -* Using libraries::
>> +* Building with mmc::
>
> I'd name this "Building with mmc --make".
>
>> +* Building with Mmake::
>> * Libraries and the Java grade::
>> @end menu
>>
>> @@ -943,8 +942,149 @@
>> as in the first example, rather than just a group of
>> unrelated modules, as in the second example.
>>
>> - at node Building libraries
>> - at section Building libraries
>> + at node Building with mmc
>> + at section Building with mmc
>
> Ditto.
>
>> +
>> + at menu
>> +* Building and installing libraries with mmc::
>> +* Using installed libraries with mmc::
>> +* Using non-installed libraries with mmc::
>> + at end menu
>
> Ditto.
>
>> +
>> +
>> + at node Building and installing libraries with mmc
>> + at subsection Building and installing libraries with mmc
>> +
>> +To build a library from the source @samp{mypackage.m} (and other included
>> +modules), run mmc with the following arguments:
>
> @samp{mmc} here and elsewhere.
>
>> +
>> + at example
>> +mmc --make libmypackage
>> + at end example
>> +
>> + at noindent
>> +mmc will create static (non-shared) object libraries
>> +and, on most platforms, shared object libraries;
>> +however, we do not yet support the creation of dynamic link
>> +libraries (DLLs) on Windows.
>> +Static libraries are created using the standard tools @samp{ar}
>> +and @samp{ranlib}.
>> +Shared libraries are created using the @samp{--make-shared-lib}
>> +option to @samp{ml}.
>
> I don't think it's necessary to discuss ar and ranlib and ml here.
In the case of ml it's incorrect; mmc --make invokes the linker
directly. It doesn't use the ml script.
Julien.
--------------------------------------------------------------------------
mercury-reviews mailing list
Post messages to: mercury-reviews at csse.unimelb.edu.au
Administrative Queries: owner-mercury-reviews at csse.unimelb.edu.au
Subscriptions: mercury-reviews-request at csse.unimelb.edu.au
--------------------------------------------------------------------------
More information about the reviews
mailing list