for review: change handling of target specific flags

Peter David ROSS petdr at cs.mu.OZ.AU
Tue Aug 25 12:43:12 AEST 1998


Hi,

Could someone review this please.

Pete.

===================================================================


Estimated hours taken: 0.25

When using target specific MCFLAGS they should occur on the command line
last so that they override any previous settings, including those set by
EXTRA_MCFLAGS.

scripts/Mmake.vars.in:
    Switch all occurences of EXTRA_* and TARGET_* so that TARGET_* comes
    last.

Index: Mmake.vars.in
===================================================================
RCS file: /home/staff/zs/imp/mercury/scripts/Mmake.vars.in,v
retrieving revision 1.21
diff -u -r1.21 Mmake.vars.in
--- Mmake.vars.in	1998/08/05 07:33:45	1.21
+++ Mmake.vars.in	1998/08/25 02:32:09
@@ -24,12 +24,12 @@
 DEFAULT_GRADE	= $(MERCURY_DEFAULT_GRADE)
 GRADE		= $(DEFAULT_GRADE)
 
-ALL_GRADEFLAGS  = $(GRADEFLAGS) $(TARGET_GRADEFLAGS) $(EXTRA_GRADEFLAGS)
+ALL_GRADEFLAGS  = $(GRADEFLAGS) $(EXTRA_GRADEFLAGS) $(TARGET_GRADEFLAGS)
 GRADEFLAGS	= --grade $(GRADE)
 EXTRA_GRADEFLAGS =
 
 MC		= mmc
-ALL_MCFLAGS	= $(MCFLAGS) $(TARGET_MCFLAGS) $(EXTRA_MCFLAGS)
+ALL_MCFLAGS	= $(MCFLAGS) $(EXTRA_MCFLAGS) $(TARGET_MCFLAGS)
 MCFLAGS		=
 EXTRA_MCFLAGS	=
 
@@ -42,14 +42,14 @@
 MCOI		= $(MC) --make-optimization-interface
 MCTOI		= $(MC) --make-transitive-optimization-interface
 
-ALL_MCIFLAGS	= $(MCIFLAGS) $(TARGET_MCFLAGS) $(EXTRA_MCIFLAGS)
-ALL_MCPIFLAGS	= $(MCPIFLAGS) $(TARGET_MCFLAGS) $(EXTRA_MCPIFLAGS)
-ALL_MCSIFLAGS	= $(MCSIFLAGS) $(TARGET_MCFLAGS) $(EXTRA_MCSIFLAGS)
-ALL_MCOIFLAGS	= $(MCOIFLAGS) $(TARGET_MCFLAGS) $(EXTRA_MCOIFLAGS)
-ALL_MCTOIFLAGS	= $(MCTOIFLAGS) $(TARGET_MCFLAGS) $(EXTRA_MCTOIFLAGS)
-ALL_MCDFLAGS	= $(MCDFLAGS) $(TARGET_MCFLAGS) $(EXTRA_MCDFLAGS)
-ALL_MCGFLAGS	= $(MCGFLAGS) $(TARGET_MCFLAGS) $(EXTRA_MCGFLAGS)
-ALL_MCSFLAGS	= $(MCSFLAGS) $(TARGET_MCFLAGS) $(EXTRA_MCSFLAGS)
+ALL_MCIFLAGS	= $(MCIFLAGS) $(EXTRA_MCIFLAGS) $(TARGET_MCFLAGS)
+ALL_MCPIFLAGS	= $(MCPIFLAGS) $(EXTRA_MCPIFLAGS) $(TARGET_MCFLAGS)
+ALL_MCSIFLAGS	= $(MCSIFLAGS) $(EXTRA_MCSIFLAGS) $(TARGET_MCFLAGS)
+ALL_MCOIFLAGS	= $(MCOIFLAGS) $(EXTRA_MCOIFLAGS) $(TARGET_MCFLAGS)
+ALL_MCTOIFLAGS	= $(MCTOIFLAGS) $(EXTRA_MCTOIFLAGS) $(TARGET_MCFLAGS)
+ALL_MCDFLAGS	= $(MCDFLAGS) $(EXTRA_MCDFLAGS) $(TARGET_MCFLAGS)
+ALL_MCGFLAGS	= $(MCGFLAGS) $(EXTRA_MCGFLAGS) $(TARGET_MCFLAGS)
+ALL_MCSFLAGS	= $(MCSFLAGS) $(EXTRA_MCSFLAGS) $(TARGET_MCFLAGS)
 
 MCIFLAGS	= $(MCFLAGS)
 MCPIFLAGS	= $(MCFLAGS)
@@ -74,68 +74,68 @@
 # the options which should be passed to them.
 #
 C2INIT		= c2init
-ALL_C2INITFLAGS	= $(C2INITFLAGS) $(TARGET_C2INITFLAGS) $(EXTRA_C2INITFLAGS)
+ALL_C2INITFLAGS	= $(C2INITFLAGS) $(EXTRA_C2INITFLAGS) $(TARGET_C2INITFLAGS)
 C2INITFLAGS	=
 EXTRA_C2INITFLAGS =
 
 MGNUC		= mgnu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S	= $(MNPFLAGS) $(TARGET_MNPFLAGS) $(EXTRA_MNPFLAGS)
+ALL_MNPFLAGS	= $(MNPFLAGS) $(EXTRA_MNPFLAGS) $(TARGET_MNPFLAGS)
 MNPFLAGS	=
 EXTRA_MNPFLAGS	=
 
 MSC		= msc
-ALL_MSCFLAGS	= $(MSCFLAGS) $(TARGET_MSCFLAGS) $(EXTRA_MSCFLAGS)
+ALL_MSCFLAGS	= $(MSCFLAGS) $(EXTRA_MSCFLAGS) $(TARGET_MSCFLAGS)
 MSCFLAGS	=
 EXTRA_MSCFLAGS	=
 
 MSL		= msl
-ALL_MSLFLAGS	= $(MSLFLAGS) $(TARGET_MSLFLAGS) $(EXTRA_MSLFLAGS)
+ALL_MSLFLAGS	= $(MSLFLAGS) $(EXTRA_MSLFLAGS) $(TARGET_MSLFLAGS)
 MSLFLAGS	=
 EXTRA_MSLFLAGS	=
 
 MSP		= msp
-ALL_MSPFLAGS	= $(MSPFLAGS) $(TARGET_MSPFLAGS) $(EXTRA_MSPFLAGS)
+ALL_MSPFLAGS	= $(MSPFLAGS) $(EXTRA_MSPFLAGS) $(TARGET_MSPFLAGS)
 MSPFLAGS	=
 EXTRA_MSPFLAGS	=
 
 AR		= ar
-ALL_ARFLAGS	= $(ARFLAGS) $(TARGET_ARFLAGS) $(EXTRA_ARFLAGS)
+ALL_ARFLAGS	= $(ARFLAGS) $(EXTRA_ARFLAGS) $(TARGET_ARFLAGS)
 ARFLAGS		= cr
 EXTRA_ARFLAGS	=
 
 RANLIB		= @RANLIB@
-ALL_RANLIBFLAGS	= $(RANLIBFLAGS) $(TARGET_RANLIBFLAGS) $(EXTRA_RANLIBFLAGS)
+ALL_RANLIBFLAGS	= $(RANLIBFLAGS) $(EXTRA_RANLIBFLAGS) $(TARGET_RANLIBFLAGS)
 RANLIBFLAGS	=
 EXTRA_RANLIBFLAGS =
----
 +----------------------------------------------------------------------+
 | Peter Ross      M Sci/Eng Melbourne Uni                              |
 | petdr at cs.mu.oz.au  WWW: www.cs.mu.oz.au/~petdr/ ph: +61 3 9344 9158  |
 +----------------------------------------------------------------------+



More information about the developers mailing list