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

Michael Richter ttmrichter at gmail.com
Mon Apr 16 23:01:36 AEST 2012


Thanks to both you and Peter for the prompt and very helpful response.
 I've been battering my head against this for a few hours now.

On 16 April 2012 20:28, Ian MacLarty <maclarty at csse.unimelb.edu.au> wrote:

> On Mon, Apr 16, 2012 at 10:09 PM, 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.
> >
> > The User's Guide recommends against using mmc raw and instead recommends
> the
> > use of mmc --make.  The latter, however, only works (it seems) from the
> > source directory itself.  I can't find any way to tell mmc --make "go to
> > directory X for source files" and I can't find a way to tell it "dump all
> > your output into directory Y".
> >
> > Is there any way to do what I want to do short of doing everything by
> hand
> > in a Makefile (and making me try to figure out how to link .o files,
> etc. by
> > hand)?
>
> Yes.  From your build directory do:
>
> mmc -f X/*.m
>
> (where X contains your source files)
>
> This will generate a Mercury.modules file that tells mmc where to find
> each module.
> Then you can do (still from your build directory):
>
> mmc --make myprogram
>
> Ian.
>
> --------------------------------------------------------------------------
> 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
> --------------------------------------------------------------------------
>



-- 
"Perhaps people don't believe this, but throughout all of the discussions
of entering China our focus has really been what's best for the Chinese
people. It's not been about our revenue or profit or whatnot."
--Sergey Brin, demonstrating the emptiness of the "don't be evil" mantra.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mercurylang.org/archives/users/attachments/20120416/b677d657/attachment.html>


More information about the users mailing list