[m-dev.] diff: fix term test bug

Fergus Henderson fjh at cs.mu.OZ.AU
Sat Jan 15 11:19:09 AEDT 2000


Is there any reason why you can't just set MCFLAGS
rather than EXTRA_MCFLAGS?  Setting EXTRA_MCFLAGS in the Mmakefile
is bad style, since EXTRA_MCFLAGS is reserved for being overridden
on the command line.

On 14-Jan-2000, Peter Ross <petdr at cs.mu.OZ.AU> wrote:
> Hi,
> 
> 
> ===================================================================
> 
> 
> Estimated hours taken: 2
> 
> Mmakefile:
>     Rather than redefining the rule to make .trans_opt files, pass the
>     extra arguments through the EXTRA_MCFLAGS variable.
>     This fixes a bug that the test cases in the term directory were
>     failing as the correct arguments were no longer being passed to
>     mmake --trans-intermod-opt.
> 
> 
> Index: Mmakefile
> ===================================================================
> RCS file: /home/staff/zs/imp/tests/term/Mmakefile,v
> retrieving revision 1.12
> diff -u -r1.12 Mmakefile
> --- Mmakefile	1999/07/14 17:04:14	1.12
> +++ Mmakefile	2000/01/14 06:32:39
> @@ -68,16 +68,12 @@
>  
>  #-----------------------------------------------------------------------------#
>  
> -MCFLAGS = --trans-intermod-opt
> -
>  MCTERMFLAGS = --enable-termination --term-single-arg 5 --term-norm simple
>  MCOPTFLAGS  = --no-inlining --no-optimize-unused-args --no-deforestation \
>  	      --no-optimize-higher-order
>  MCTRANSOPTFLAGS = $(MCTERMFLAGS) $(MCOPTFLAGS)
>  
> -$(trans_opts_subdir)%.trans_opt: %.m
> -	$(MC) $(ALL_MCFLAGS) --make-trans-opt $(MCTRANSOPTFLAGS) $< \
> -		> $*.trans_opt_err 2>&1
> +EXTRA_MCFLAGS=$(MCTRANSOPTFLAGS)
>  
>  %.trans_opt_res: %.trans_opt_exp $(trans_opts_subdir)%.trans_opt
>  	diff -c $*.trans_opt_exp $(trans_opts_subdir)$*.trans_opt > $@
> 
> ----
> Peter Ross
> PhD Student University of Melbourne
> http://www.cs.mu.oz.au/~petdr/
> --------------------------------------------------------------------------
> 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
> --------------------------------------------------------------------------

-- 
Fergus Henderson <fjh at cs.mu.oz.au>  |  "I have always known that the pursuit
WWW: <http://www.cs.mu.oz.au/~fjh>  |  of excellence is a lethal habit"
PGP: finger fjh at 128.250.37.3        |     -- 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