[mercury-users] DateStamps and Targets

David Overton dmo at cs.mu.OZ.AU
Wed Oct 16 15:05:17 AEST 2002


Unable to resist joining this discussion any longer...

On Wed, Oct 16, 2002 at 03:59:13AM -0000, Noel  Pinto wrote:
> 
> 
> Where does Mmakefile come into picture?? If I use mmake for a 
> file1.m, it would be like...
> 
> mmake file1.depend
> mmake file1

Yes.  You do this for the main file in your program.  I.e. file1.m must
contain a "main" predicate for this to work.

In the "mmake file1.depend" step the Mercury compiler will look at
file1.m and work out what other files it depends on (i.e. what files
will need to be compiled and linked to make the program).
Then when you type "mmake file1" it will compile file1.m and all the
other files it discovered in the first step, and then link them into an
executable program.

This will work without writing a Mmakefile.  You only need a Mmakefile
if you want to set other variables which will affect the compilation
process, such as the "MAIN_TARGET" variable described in an earlier
post.

> how do you create a Mmakefile... I really do not have any idea.

The Mmakefile is just a plain text file.  You can create it with any
text editor.


David
-- 
David Overton                  Uni of Melbourne     +61 3 8344 9159
dmo at cs.mu.oz.au                Monash Uni (Clayton) +61 3 9905 5779
http://www.cs.mu.oz.au/~dmo    Mobile Phone         +61 4 0337 4393
--------------------------------------------------------------------------
mercury-users mailing list
post:  mercury-users at cs.mu.oz.au
administrative address: owner-mercury-users at cs.mu.oz.au
unsubscribe: Address: mercury-users-request at cs.mu.oz.au Message: unsubscribe
subscribe:   Address: mercury-users-request at cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------



More information about the users mailing list