[m-rev.] diff: make c2init and ml take the same set of options
Simon Taylor
stayl at cs.mu.OZ.AU
Tue Dec 18 23:13:45 AEDT 2001
Estimated hours taken: 0.5
Branches: main
Finish off the change to make `ml' and `c2init' take the
same set of options.
scripts/Mmake.vars.in:
Make ALL_MLFLAGS include C2INITFLAGS, EXTRA_C2INITFLAGS, etc.
ALL_C2INITFLAGS is now equivalent to ALL_MLFLAGS.
doc/reference_manual.texi:
Change references to C2INITFLAGS to refer to MLFLAGS instead.
Index: scripts/Mmake.vars.in
===================================================================
RCS file: /home/mercury1/repository/mercury/scripts/Mmake.vars.in,v
retrieving revision 1.58
diff -u -u -r1.58 Mmake.vars.in
--- scripts/Mmake.vars.in 28 Oct 2001 18:04:12 -0000 1.58
+++ scripts/Mmake.vars.in 18 Dec 2001 03:30:09 -0000
@@ -117,19 +117,6 @@
# The following variables hold the names of various programs and
# the options which should be passed to them.
#
-C2INIT = c2init
-ALL_C2INITFLAGS = $(C2INITFLAGS) $(EXTRA_C2INITFLAGS) $(TARGET_C2INITFLAGS) \
- $(LIB_C2INITFLAGS)
-C2INITFLAGS =
-EXTRA_C2INITFLAGS =
-LIB_C2INITFLAGS = $(patsubst %,--init-file-directory %,$(EXTRA_INIT_DIRS))
-
-ALL_C2INITARGS = $(C2INITARGS) $(EXTRA_C2INITARGS) $(TARGET_C2INITARGS) \
- $(LIB_C2INITARGS)
-C2INITARGS =
-EXTRA_C2INITARGS =
-LIB_C2INITARGS = $(patsubst %,%.init,$(ALL_EXTRA_LIBRARIES))
-
MGNUC = mgnuc
ALL_MGNUCFLAGS = $(MGNUCFLAGS) $(EXTRA_MGNUCFLAGS) $(TARGET_MGNUCFLAGS) \
$(LIB_MGNUCFLAGS) $(ALL_CFLAGS)
@@ -182,8 +169,24 @@
EXTRA_MS_CSCFLAGS =
LIB_MS_CSCFLAGS =
+C2INIT = c2init
+# c2init and ml take the same arguments.
+ALL_C2INITFLAGS = $(ALL_MLFLAGS)
+C2INITFLAGS =
+EXTRA_C2INITFLAGS =
+LIB_C2INITFLAGS = $(patsubst %,--init-file-directory %,$(EXTRA_INIT_DIRS))
+
+ALL_C2INITARGS = $(C2INITARGS) $(EXTRA_C2INITARGS) $(TARGET_C2INITARGS) \
+ $(LIB_C2INITARGS)
+C2INITARGS =
+EXTRA_C2INITARGS =
+LIB_C2INITARGS = $(patsubst %,%.init,$(ALL_EXTRA_LIBRARIES))
+
ML = ml
-ALL_MLFLAGS = $(MLFLAGS) $(EXTRA_MLFLAGS) $(TARGET_MLFLAGS) $(LIB_MLFLAGS)
+ALL_MLFLAGS = $(MLFLAGS) $(C2INITFLAGS) \
+ $(EXTRA_MLFLAGS) $(EXTRA_C2INITFLAGS) \
+ $(TARGET_MLFLAGS) $(TARGET_C2INITFLAGS) \
+ $(LIB_MLFLAGS) $(LIB_C2INITFLAGS)
MLFLAGS = $(EXTRA_MLFLAGS)
EXTRA_MLFLAGS =
LIB_MLFLAGS = $(patsubst %,-R%,$(EXTRA_C_LIB_DIRS)) \
Index: doc/user_guide.texi
===================================================================
RCS file: /home/mercury1/repository/mercury/doc/user_guide.texi,v
retrieving revision 1.282
diff -u -u -r1.282 user_guide.texi
--- doc/user_guide.texi 4 Dec 2001 00:44:25 -0000 1.282
+++ doc/user_guide.texi 18 Dec 2001 11:56:17 -0000
@@ -655,7 +655,7 @@
@item MLFLAGS and EXTRA_MLFLAGS
@vindex MLFLAGS
@vindex EXTRA_MLFLAGS
-Options to pass to the linker.
+Options to pass to the linker and the c2init program.
(Note that compilation model options should be
specified in @code{GRADEFLAGS}, not in @code{MLFLAGS}.)
@@ -673,7 +673,10 @@
@item C2INITFLAGS and EXTRA_C2INITFLAGS
@vindex C2INITFLAGS
@vindex EXTRA_C2INITFLAGS
-Options to pass to the c2init program.
+Options to pass to the linker and the c2init program.
+ at code{C2INITFLAGS} and @code{EXTRA_C2INITFLAGS} are obsolete synonyms
+for @code{MLFLAGS} and @code{EXTRA_MLFLAGS} (@code{ml} and @code{c2init}
+take the same set of options).
(Note that compilation model options and extra files to be processed by
c2init should not be specified in @code{C2INITFLAGS} - they should be
specified in @code{GRADEFLAGS} and @code{C2INITARGS}, respectively.)
@@ -682,8 +685,9 @@
@vindex C2INITARGS
@vindex EXTRA_C2INITARGS
Extra files to be processed by c2init. These variables should not be
-used for specifying flags to c2init (that's what @code{C2INITFLAGS} is for)
-since they are also used to derive extra dependency information.
+used for specifying flags to c2init (those should be specified in
+ at code{MLFLAGS}) since they are also used to derive extra dependency
+information.
@item EXTRA_LIBRARIES
@vindex EXTRA_LIBRARIES
@@ -1569,7 +1573,7 @@
then you must also pass the @samp{--trace} (or @samp{-t}) option
to c2init and to the Mercury linker.
If you're using Mmake, then you can do this by including @samp{--trace}
-in the @samp{C2INITFLAGS} and @samp{MLFLAGS} variables.
+in the @samp{MLFLAGS} variable.
If you're using Mmake, then you can also set the compilation options
for a single module named @var{Module} by setting the Mmake variable
@@ -1578,7 +1582,6 @@
and everything else with no tracing, you could use the following:
@example
-C2INITFLAGS = --trace
MLFLAGS = --trace
MCFLAGS-foo = --trace deep
MCFLAGS-bar = --trace shallow
@@ -4091,12 +4094,11 @@
and @samp{ml} as well as to @samp{mmc}.
If you are using Mmake, then you should specify
these options in the @samp{GRADEFLAGS} variable rather than specifying
-them in @samp{MCFLAGS}, @samp{MGNUCFLAGS}, @samp{C2INITFLAGS}
-and @samp{MLFLAGS}.
+them in @samp{MCFLAGS}, @samp{MGNUCFLAGS} and @samp{MLFLAGS}.
@vindex GRADEFLAGS
@vindex MCFLAGS
@vindex MGNUCFLAGS
- at vindex C2INITFLAGS
+ at vindex MLFLAGS
@menu
* Grades and grade components:: Setting the compilation model
--------------------------------------------------------------------------
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