[m-dev.] compiler/Mmakefile and Mmake.params

Fergus Henderson fjh at cs.mu.OZ.AU
Mon May 28 23:47:58 AEST 2001


On 28-May-2001, David Jeffery <dgj at cs.mu.OZ.AU> wrote:
> When I want to redefine Mmake variables for compiling the compiler, I
> typically put the new values in Mmake.params. For example, if I want to 
> compile a bunch of modules with debugging turned on, I put:
> 
> --------------------------------------------------------------------
> MCFLAGS-polymorphism = --trace deep
> [etc.]
> MCFLAGS-term = --trace shallow
> MCFLAGS-map = --trace shallow
> MCFLAGS-list = --trace shallow
> 
> EXTRA_MLFLAGS = --trace
> 
> C2INITFLAGS=-t
> --------------------------------------------------------------------
> 
> This has worked fine until recently... but I now find that compiler/Mmakefile
> redefines C2INITFLAGS, so I now have to edit the Mmakefile directly.
> 
> Perhaps the definition of C2INITFLAGS in compiler/Mmakefile should be
> changed to C2INITFLAGS+=<whatever> rather than C2INITFLAGS=<whatever>.
> Is this the best approach (and should this be our policy for all such
> variables in the compiler's Mmakefiles)? Or should I be using 
> EXTRA_C2INITFLAGS?

You should be using EXTRA_C2INITFLAGS.

In fact you really ought to be using EXTRA- prefixes on the front of *all*
variables overridden in Mmake.params.  This means that you should
be using EXTRA_MCFLAGS-foo rather than MCFLAGS-foo.
Unfortunately, however, Mmake doesn't support EXTRA_MCFLAGS-*,
so until that is fixed you need to keep using MCFLAGS-*,
bearing in mind that it will override the settings of MCFLAGS-*
in library/Mmakefile.

-- 
Fergus Henderson <fjh at cs.mu.oz.au>  |  "I have always known that the pursuit
                                    |  of excellence is a lethal habit"
WWW: <http://www.cs.mu.oz.au/~fjh>  |     -- the last words of T. S. Garp.
--------------------------------------------------------------------------
mercury-developers mailing list
Post messages to:       mercury-developers at cs.mu.oz.au
Administrative Queries: owner-mercury-developers at cs.mu.oz.au
Subscriptions:          mercury-developers-request at cs.mu.oz.au
--------------------------------------------------------------------------



More information about the developers mailing list