[m-rev.] diff: LIBRARY_TRACE_MINIMUM

Zoltan Somogyi zs at cs.mu.OZ.AU
Mon May 26 20:04:08 AEST 2003


Mmake.common.in:
library/Mmakefile:
	Allow Mmake.params to specify LIBRARY_TRACE_MINIMUM=no, which
	allows Mmake.params to also specify the trace level of the library,
	and in debugging grades by default compiles the library with
	--trace deep.

	Include Mmake.library.params if it exists.

Zoltan.

Index: Mmake.common.in
===================================================================
RCS file: /home/mercury1/repository/mercury/Mmake.common.in,v
retrieving revision 1.73
diff -u -b -r1.73 Mmake.common.in
--- Mmake.common.in	19 May 2003 01:38:10 -0000	1.73
+++ Mmake.common.in	26 May 2003 08:46:37 -0000
@@ -142,6 +142,15 @@
 # complicating things.
 LIBRARY_INTERMODULE = yes
 
+# Do we want to compile the library with --trace minimum?
+# By default yes, since the library is pretty well debugged. However,
+# when it is being modified, it may have bugs we may want to chase down,
+# so we allow the user to override this by setting LIBRARY_TRACE_MINIMUM to no.
+# However, the test cases assume that the library is compiled with --trace
+# minimum, so if you do that, expect test case failures in the debugger
+# directory.
+LIBRARY_TRACE_MINIMUM = yes
+
 # Do we want to include the support for compiling directly to assembler
 # using the GCC back-end in the compiler?
 # This requires that you have the source code for gcc in the
Index: library/Mmakefile
===================================================================
RCS file: /home/mercury1/repository/mercury/library/Mmakefile,v
retrieving revision 1.114
diff -u -b -r1.114 Mmakefile
--- library/Mmakefile	14 May 2003 14:38:46 -0000	1.114
+++ library/Mmakefile	26 May 2003 08:43:01 -0000
@@ -26,6 +26,7 @@
 MERCURY_DIR=..
 LINK_RUNTIME_ONLY=yes
 include $(MERCURY_DIR)/Mmake.common
+-include Mmake.library.params
 
 # Module-specific options should go in Mercury.options so they
 # can be found by `mmc --make'.
@@ -40,8 +41,8 @@
 #-----------------------------------------------------------------------------#
 
 # Specify which options to use to compile the library.
-# Don't change these without good reason - if you want to
-# do a temporary change, change ../Mmake.params.
+# Don't change these without good reason - if you want to do a temporary
+# change, change ../Mmake.params, or create Mmake.library.params.
 
 ifeq ($(LIBRARY_INTERMODULE),yes)
 
@@ -78,9 +79,17 @@
 # library to be shallow traced, not deep traced, in debugging grades.
 # This is probably what most users want, and it makes it much easier to
 # maintain the expected output of the debugging test cases in debugging grades.
+# However, this can be overridden by setting LIBRARY_TRACE_MINIMUM to no.
 #
 # Always generate dependencies for use by `mmc --make'.
-MCFLAGS += --strict-sequential --trace minimum --generate-mmc-deps \
+
+ifeq ($(LIBRARY_TRACE_MINIMUM),no)
+LIBRARY_TRACE_LEVEL =
+else
+LIBRARY_TRACE_LEVEL = --trace minimum
+endif
+
+MCFLAGS += --strict-sequential $(LIBRARY_TRACE_LEVEL) --generate-mmc-deps \
 		$(INTERMODULE_OPTS) $(ENABLE_TERM_OPTS) $(CHECK_TERM_OPTS)
 
 # The IL and Java implementations of the standard library are not yet complete,
--------------------------------------------------------------------------
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