[mercury-users] Either a documentation request or a feature request. I'm not sure which.

Peter Ross pro at missioncriticalit.com
Mon Apr 16 22:25:34 AEST 2012


On 16 April 2012 14:09, Michael Richter <ttmrichter at gmail.com> wrote:
> In general when I build packages I like to keep my build offal (intermediate
> forms, etc.) separate from my source files.  This makes cleaning up
> afterwards simpler (rm -fR build) and avoids errors like missing which files
> need to be deleted or, worse, deleting files that are actually needed.
>
> I can't figure out how to do this in Mercury.
>

Say you have this directory structure

src
lib
build

where src and lib contain mercury files that you're using to build and
build is where you want to built your executable.

In the build directory you need to issue the following command
whenever you add a new mercury file

mmc -f ../src/*.m ../lib/*.m

this builds a file called Mercury.modules which the compiler users to
map module names to file names.

Now you just use mmc --make as per normal to build your application.  eg

mmc --make your_application

As mmc --make will now use the Mercury.modules file to locate the
source file for a given mercury module.

--------------------------------------------------------------------------
mercury-users mailing list
Post messages to:       mercury-users at csse.unimelb.edu.au
Administrative Queries: owner-mercury-users at csse.unimelb.edu.au
Subscriptions:          mercury-users-request at csse.unimelb.edu.au
--------------------------------------------------------------------------



More information about the users mailing list