[mercury-users] Mmake warnings with mercury 0.13.0-beta-2006-06-29

Julien Fischer juliensf at cs.mu.OZ.AU
Tue Jul 4 01:16:10 AEST 2006


On Mon, 3 Jul 2006, Nicolas Pelletier wrote:

> Hello,
>
> when  using  the following Mmakefile  and  compiling the simple module
> below, I get these warnings:
>
> nicolas at reglisse:~/dev/toto$ mmake toto.depend
> mmc --generate-dependencies --grade asm_fast.gc     --use-subdirs --verbose-error-messages     toto
> nicolas at reglisse:~/dev/toto$ mmake toto
> /tmp/mmake.2rXmdu:1248: warning: undefined variable `MMAKE_USE_SUBDIRS_EXPLICIT'
> /tmp/mmake.2rXmdu:1272: warning: undefined variable `MMAKE_USE_SUBDIRS_EXPLICIT'
> mmc --compile-to-c --grade asm_fast.gc     --use-subdirs --verbose-error-messages --use-subdirs    toto > toto.err 2>&1
> mgnuc --grade asm_fast.gc        --      -I. -IMercury/mihs/. -c Mercury/cs/toto.c -o Mercury/os/toto.o
> mgnuc --grade asm_fast.gc        --      -I. -IMercury/mihs/. -c Mercury/cs/toto_init.c -o Mercury/os/toto_init.o
> ml --grade asm_fast.gc              --    -o toto Mercury/os/toto_init.o \
>         Mercury/os/toto.o \
>
> Mmakefile:
> MCFLAGS = --use-subdirs --verbose-error-messages
>
> toto.m:
> :- module toto.
> :- interface.
> :- import_module io.
> :- pred main((io :: di), (io :: uo)) is det.
> :- implementation.
> main --> print("Toto"), nl.
> :- end_module toto.
>
> This MMAKE_USE_SUBDIRS_EXPLICIT variable appears to be used inside the
> installed Mmake.rules,   but not defined  anywhere else.  Should it be
> defined in the environment ?

No.  The variable MMAKE_USE_SUBDIRS_EXPLICIT can be set to "yes" if you want
mmake to print the action it uses to create (sub-)directories.  Unless you're
debugging mmake itself I can't see that being useful though.

If it's annoying you can always set MMAKE_USE_SUBDIRS_EXPLICIT to something
other than yes, no for example.  BTW, I would strong recommend that instead of
using mmake you use the compiler's built-in build system, mmc --make.  It's
generally faster than mmake and doesn't required a separate step to build
the dependencies.  (Also, it uses --use-subdirs by default).  You can compile
the above program with:

	mmc --make toto

The (admittedly sparse) documentation for mmc --make is at the end of chapter
5 of the Mercury User's Guide.

Julien.


--------------------------------------------------------------------------
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