[m-rev.] diff: fix MCFLAGS-<module> bug

Simon Taylor stayl at cs.mu.OZ.AU
Tue Jun 25 02:16:20 AEST 2002


Estimated hours taken: 1
Branches: main

scripts/Mmake.vars.in:
	The code to look up the target-specific MCFLAGS variable
	assumed that mmc is always invoked by a pattern rule, which
	isn't true if the module name doesn't match the file name.

Index: Mmake.vars.in
===================================================================
RCS file: /home/mercury1/repository/mercury/scripts/Mmake.vars.in,v
retrieving revision 1.73
diff -u -u -r1.73 Mmake.vars.in
--- Mmake.vars.in	30 May 2002 12:55:22 -0000	1.73
+++ Mmake.vars.in	24 Jun 2002 16:03:00 -0000
@@ -399,9 +399,10 @@
 maybe-target-GRADEFLAGS-undefined =
 
 TARGET_MCFLAGS = \
-  $(maybe-base-MCFLAGS-$(findstring undefined,$(origin MCFLAGS-$*)))
-maybe-base-MCFLAGS- = $(MCFLAGS-$*)
-maybe-base-MCFLAGS-undefined =
+  $(maybe-target-MCFLAGS-$(findstring undefined,\
+  		$(origin MCFLAGS-$(notdir $(basename $@)))))
+maybe-target-MCFLAGS- = $(MCFLAGS-$(notdir $(basename $@)))
+maybe-target-MCFLAGS-undefined =
 
 TARGET_C2INITFLAGS = \
   $(maybe-target-C2INITFLAGS-$(findstring undefined,\
--------------------------------------------------------------------------
mercury-reviews mailing list
post:  mercury-reviews at cs.mu.oz.au
administrative address: owner-mercury-reviews at cs.mu.oz.au
unsubscribe: Address: mercury-reviews-request at cs.mu.oz.au Message: unsubscribe
subscribe:   Address: mercury-reviews-request at cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------



More information about the reviews mailing list