[m-rev.] for review: remove junk from command lines

Zoltan Somogyi zs at cs.mu.OZ.AU
Fri Apr 29 16:15:38 AEST 2005


For review by anyone.

I can't really test the effect of this change on the nightly tests, which
use a different setup from bootcheck. It is likely that they will need some
minor tweaks, which I won't have time to do next week.

Zoltan.

Remove most of the junk from the command lines executed by make when building
the compiler and by bootcheck when building test cases. We do this by moving
the junk into files consulted via the --flags option.

After this change, it is actually possible to see in a glance not just which
files are being compiled but also with which options. The size of the output
(measured in bytes) from a bootcheck is now only about 40% of what is was
before.

configure.in:
	Remember the path to the bootstrap compiler and the flags it should be
	invoked with separately. Put the flags into the FLAGS files in various
	directories.

	Test whether the default install directory actually exists, so that
	the -L and -R linker options referring to this directory are passed
	to the C compiler only if it does.

Mmake.common.in:
	Comment out a bunch of additions of MCFLAGS, the ones whose contents
	are now in FLAGS files.

	Conform to the changes in configure.in.

	Add a template rule for the dependencies of the FLAGS files.

Mmake.workspace:
	Comment out a bunch of additions of MCFLAGS, the ones whose contents
	are now in FLAGS files. In some cases, add references to the FLAGS
	files.

Mmakefile:
	When rebuilding Mmake.common, rebuild only Mmake.common, not all files
	created by configure.

analysis/ANALYSIS_FLAGS.in:
browser/MDB_FLAGS.in:
compiler/COMP_FLAGS.in:
deep_profiler/PROF_FLAGS.in:
library/LIB_FLAGS.in:
mdbcomp/MDBCOMP_FLAGS.in:
profiler/DEEP_FLAGS.in:
slice/SLICE_FLAGS.in:
tests/TESTS_FLAGS.in:
	Add these files, which each contain the junk flags (the flags which are
	the same on every invocation and mostly just clutter up compiler
	command lines) that are needed on each compiler invocation in the
	relevant directory. Besides the results of configuration (word size
	etc), and the paths to other parts of the system, these files mostly
	control which warnings are enabled.

	Restrict the list of directories in -I options to what is sensible;
	for example, don't specify -I../analysis in the deep_profiler
	directory.

library/INTER_FLAGS:
	Add this file, which contains the flags enabled with intermodule
	optimization.

tests/WS_FLAGS.ws:
	Add this file. Unlike the .in files, which processed by config.status
	based on the results of autoconfiguration, this one is processed to
	specify the location of the workspace being tested.

analysis/Mmakefile:
browser/Mmakefile:
compiler/Mmakefile:
deep_profiler/Mmakefile:
library/Mmakefile:
mdbcomp/Mmakefile:
profiler/Mmakefile:
tests/Mmakefile:
	Include the relevant directory's FLAGS file on the command line, to
	replace all the additions to MCFLAGS in ../Mmake.common and in
	../Mmake.workspace, and in some cases, the directory-specific Mmakefile
	itself.

	Build the directory's FLAGS file before executing the depend target,
	since most compiler options beyond --generate-dependencies come from
	there.

	Delete the FLAGS files generated by config.status when doing "make
	clean".

tests/Mmakefile:
	Allow the environment to define DIFF_OPTS.

runtime/Mmakefile:
	Use an option to tell config.status what to rebuild, not some
	environment variables.

tests/invalid/Mercury.options:
	For two test cases, reset an option that is set in tests/WS_FLAGS,
	to match the options the affected tests were compiled with before.

tests/warnings/Mmakefile:
	For all test cases, reset an option that is set in tests/WS_FLAGS,
	to match the options the tests were compiled with before.

scripts/prepare_tmp_dir_grade_part
	Copy the flags files when creating the subdirectories of tmp_dir.

tools/bootcheck:
	Copy the FLAGS files when creating stage2 and stage3.

	Don't specify the compiler options that are now in FLAGS files.

	Fill in the location of the workspace in tests/WS_FlAGS before running
	the tests.

	Provide a mechanism (a file ~/.bootcheck_diff_opts) to allow the user
	to specify what options to invoke diff with.

cvs diff: Diffing .
Index: Mmake.common.in
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/Mmake.common.in,v
retrieving revision 1.81
diff -u -b -r1.81 Mmake.common.in
--- Mmake.common.in	28 Jan 2005 07:11:28 -0000	1.81
+++ Mmake.common.in	11 Apr 2005 05:37:23 -0000
@@ -29,7 +29,7 @@
 #-----------------------------------------------------------------------------#
 
 # Specify the Mercury compiler to use for bootstrapping.
-MC		= @BOOTSTRAP_MC@
+MC		= @BOOTSTRAP_MC_COMPILER@
 
 # Specify the compilation model to use for compiling the compiler.
 GRADE		= @GRADE@
@@ -121,6 +121,8 @@
 INSTALL_PREFIX		= @prefix@
 FINAL_INSTALL_PREFIX	= @prefix@
 
+INSTALLABLE_PREFIX	= @INSTALLABLE_PREFIX@
+
 #-----------------------------------------------------------------------------#
 
 INSTALL_MERC_GC_LIB_DIR	= $(INSTALL_MERC_GRADELESS_LIB_DIR)
@@ -138,7 +140,8 @@
 GRADESTRING = $(shell $(SCRIPTS_DIR)/canonical_grade $(ALL_GRADEFLAGS))
 
 # Options to pass to the Mercury compiler
-MCFLAGS	+= --no-infer-all --halt-at-warn --no-warn-inferred-erroneous
+# now included in FLAGS files
+# MCFLAGS	+= --no-infer-all --halt-at-warn --no-warn-inferred-erroneous
 
 # Do we want to deal with intermodule information when building the library?
 # By default yes, since this way we note immediately when intermodule
@@ -459,5 +462,16 @@
 
 endif
 # ifdef CHECK_OBJS
+
+#-----------------------------------------------------------------------------#
+
+%_FLAGS.date:	%_FLAGS.in ../config.status
+		- at chmod u+w $*_FLAGS > /dev/null 2>&1
+		@../config.status --file $*_FLAGS
+		@chmod a-w $*_FLAGS
+		@echo datestamp > $*_FLAGS.date
+
+%_FLAGS:	%_FLAGS.date
+		@true
 
 #-----------------------------------------------------------------------------#
Index: Mmake.workspace
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/Mmake.workspace,v
retrieving revision 1.17
diff -u -b -r1.17 Mmake.workspace
--- Mmake.workspace	28 Jan 2005 07:11:29 -0000	1.17
+++ Mmake.workspace	12 Apr 2005 04:59:04 -0000
@@ -102,15 +102,17 @@
 
 ifeq ($(origin MERCURY_CONFIG_FILE),undefined)
 MERCURY_CONFIG_FILE =	$(SCRIPTS_DIR)/Mercury.config.bootstrap
+CONFIG_OVERRIDE =
+else
+CONFIG_OVERRIDE = --config-file $(MERCURY_CONFIG_FILE)
 endif
 
-MCFLAGS +=	--config-file $(MERCURY_CONFIG_FILE)
-
 ifeq ($(MMAKE_USE_MMC_MAKE),yes)
 MCFLAGS +=	--options-file $(WORKSPACE)/Mercury.options
 endif
 
-MCFLAGS += 	--no-mercury-stdlib-dir -I$(LIBRARY_DIR)
+# now in FLAGS files
+# MCFLAGS    += --no-mercury-stdlib-dir -I$(LIBRARY_DIR)
 MGNUCFLAGS +=	--no-mercury-stdlib-dir
 C2INITFLAGS += 	--trace-init-file $(BROWSER_DIR)/$(BROWSER_LIB_NAME).init \
 		--trace-init-file $(MDBCOMP_DIR)/$(MDBCOMP_LIB_NAME).init
@@ -133,7 +135,8 @@
 endif
 endif
 CFLAGS +=	$(C_INCL_DIRS)
-MCFLAGS +=	$(C_INCL_DIRS:-I%=--c-include-directory %)
+# now in FLAGS files
+# MCFLAGS    += $(C_INCL_DIRS:-I%=--c-include-directory %)
 
 #
 # Work out the .NET directories
@@ -215,12 +218,13 @@
 		-L$(BROWSER_DIR)
 
 MLFLAGS +=	$(LIB_DIR_OPTS)
-MCFLAGS +=	$(LIB_DIR_OPTS)
+# now in FLAGS files
+# MCFLAGS    += $(LIB_DIR_OPTS)
 MLLIBS +=	$(LINK_LIB_OPTS)
 
 ifeq ($(SET_RPATH),yes)
 MLFLAGS += $(LIB_DIR_OPTS:-L%=-R%)
-MCFLAGS += $(LIB_DIR_OPTS:-L%=-R%)
+MCFLAGS += --flags RPATH
 endif
 
 endif # LINK_STATIC != yes
Index: Mmakefile
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/Mmakefile,v
retrieving revision 1.109
diff -u -b -r1.109 Mmakefile
--- Mmakefile	29 Apr 2005 01:02:59 -0000	1.109
+++ Mmakefile	29 Apr 2005 01:09:20 -0000
@@ -339,7 +339,7 @@
 	fi
 
 Mmake.common: Mmake.common.in config.status
-	./config.status
+	./config.status --file Mmake.common
 
 README: .README.in VERSION
 	sed 's/@VERSION@/$(VERSION)/g' .README.in > README
Index: configure.in
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/configure.in,v
retrieving revision 1.414
diff -u -b -r1.414 configure.in
--- configure.in	23 Mar 2005 03:51:08 -0000	1.414
+++ configure.in	29 Apr 2005 02:58:12 -0000
@@ -91,9 +91,18 @@
 AC_DEFINE_UNQUOTED(MR_VERSION, "$VERSION")
 if test "$prefix" = "NONE"; then
 	PREFIX="$ac_default_prefix"
+	if test -d $PREFIX
+	then
+		INSTALLABLE_PREFIX=yes
+	else
+		INSTALLABLE_PREFIX=no
+	fi
 else
 	PREFIX="$prefix"
+	# the directory may be created later
+	INSTALLABLE_PREFIX=yes
 fi
+AC_SUBST(INSTALLABLE_PREFIX)
 case "$PREFIX" in
     *\ *)
 	AC_MSG_ERROR(
@@ -3490,7 +3499,11 @@
 if test "$BOOTSTRAP_MC" = ""; then
 	BOOTSTRAP_MC=mmc
 fi
-BOOTSTRAP_MC="$BOOTSTRAP_MC $HAVE_BOXED_FLOATS --conf-low-tag-bits $LOW_TAG_BITS --bits-per-word $BITS_PER_WORD --bytes-per-word $BYTES_PER_WORD"
+BOOTSTRAP_MC_COMPILER="$BOOTSTRAP_MC"
+BOOTSTRAP_MC_ARGS="$HAVE_BOXED_FLOATS --conf-low-tag-bits $LOW_TAG_BITS --bits-per-word $BITS_PER_WORD --bytes-per-word $BYTES_PER_WORD"
+BOOTSTRAP_MC="$BOOTSTRAP_MC_COMPILER $BOOTSTRAP_MC_ARGS"
+AC_SUBST(BOOTSTRAP_MC_COMPILER)
+AC_SUBST(BOOTSTRAP_MC_ARGS)
 AC_SUBST(BOOTSTRAP_MC)
 #-----------------------------------------------------------------------------#
 
@@ -3999,6 +4012,15 @@
 bindist/bindist.INSTALL bindist/bindist.Makefile
 tools/lmc tools/dotime runtime/mercury_dotnet.cs java/runtime/Constants.java
 java/runtime/Native.java
+compiler/COMP_FLAGS
+library/LIB_FLAGS
+mdbcomp/MDBCOMP_FLAGS
+browser/MDB_FLAGS
+analysis/ANALYSIS_FLAGS
+slice/SLICE_FLAGS
+profiler/PROF_FLAGS
+deep_profiler/DEEP_FLAGS
+tests/TESTS_FLAGS
 ,
 [
 # Only do this when compiling the source, not when reconfiguring
cvs diff: Diffing analysis
Index: analysis/ANALYSIS_FLAGS.in
===================================================================
RCS file: analysis/ANALYSIS_FLAGS.in
diff -N analysis/ANALYSIS_FLAGS.in
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ analysis/ANALYSIS_FLAGS.in	11 Apr 2005 08:28:43 -0000
@@ -0,0 +1,20 @@
+ at BOOTSTRAP_MC_ARGS@
+--no-infer-all
+--halt-at-warn
+--no-warn-inferred-erroneous
+--no-mercury-stdlib-dir
+-I../library
+-I../browser
+-I../mdbcomp
+--c-include-directory ../boehm_gc
+--c-include-directory ../boehm_gc/include
+--c-include-directory ../runtime
+--c-include-directory ../library
+--c-include-directory ../library/Mercury/mihs
+--c-include-directory ../mdbcomp
+--c-include-directory ../mdbcomp/Mercury/mihs
+--c-include-directory ../browser
+--c-include-directory ../browser/Mercury/mihs
+--c-include-directory ../trace
+--c-include-directory ../analysis
+--config-file ../scripts/Mercury.config.bootstrap
Index: analysis/Mmakefile
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/analysis/Mmakefile,v
retrieving revision 1.4
diff -u -b -r1.4 Mmakefile
--- analysis/Mmakefile	28 Jan 2005 07:11:33 -0000	1.4
+++ analysis/Mmakefile	29 Apr 2005 03:02:06 -0000
@@ -23,8 +23,7 @@
 # Don't change these without good reason - if you want to
 # do a temporary change, change ../Mmake.params.
 
-MLFLAGS +=	-R$(FINAL_INSTALL_MERC_LIB_DIR)	\
-		-R$(FINAL_INSTALL_MERC_GC_LIB_DIR)
+MLFLAGS += -R$(FINAL_INSTALL_MERC_LIB_DIR) -R$(FINAL_INSTALL_MERC_GC_LIB_DIR)
 
 MTAGS	=	$(SCRIPTS_DIR)/mtags
 
@@ -47,6 +46,8 @@
 
 endif
 
+MCFLAGS	     += --flags ANALYSIS_FLAGS $(CONFIG_OVERRIDE)
+
 #-----------------------------------------------------------------------------#
 
 # targets
@@ -56,7 +57,7 @@
 
 DEPENDS = $(ANALYSIS_LIB_NAME).depend
 .PHONY: depend
-depend:	$(DEPENDS)
+depend:	ANALYSIS_FLAGS $(DEPENDS)
 
 .PHONY: check
 check:	$(ANALYSIS_LIB_NAME).check
@@ -110,6 +111,11 @@
 
 .PHONY: library
 library: lib$(ANALYSIS_LIB_NAME)
+
+#-----------------------------------------------------------------------------#
+
+realclean_local:
+	rm -f ANALYSIS_FLAGS ANALYSIS_FLAGS.date
 
 #-----------------------------------------------------------------------------#
 
cvs diff: Diffing bindist
cvs diff: Diffing boehm_gc
cvs diff: Diffing boehm_gc/Mac_files
cvs diff: Diffing boehm_gc/cord
cvs diff: Diffing boehm_gc/cord/private
cvs diff: Diffing boehm_gc/doc
cvs diff: Diffing boehm_gc/include
cvs diff: Diffing boehm_gc/include/private
cvs diff: Diffing boehm_gc/tests
cvs diff: Diffing browser
Index: browser/MDB_FLAGS.in
===================================================================
RCS file: browser/MDB_FLAGS.in
diff -N browser/MDB_FLAGS.in
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ browser/MDB_FLAGS.in	11 Apr 2005 08:28:47 -0000
@@ -0,0 +1,23 @@
+ at BOOTSTRAP_MC_ARGS@
+--no-infer-all
+--halt-at-warn
+--no-warn-inferred-erroneous
+--no-mercury-stdlib-dir
+--no-shlib-linker-use-install-name
+-I../library
+-I../browser
+-I../mdbcomp
+--c-include-directory ../boehm_gc
+--c-include-directory ../boehm_gc/include
+--c-include-directory ../runtime
+--c-include-directory ../library
+--c-include-directory ../library/Mercury/mihs
+--c-include-directory ../mdbcomp
+--c-include-directory ../mdbcomp/Mercury/mihs
+-L../boehm_gc
+-L../runtime
+-L../library
+-L../trace
+-L../mdbcomp
+-L../browser
+--config-file ../scripts/Mercury.config.bootstrap
Index: browser/Mmakefile
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/browser/Mmakefile,v
retrieving revision 1.45
diff -u -b -r1.45 Mmakefile
--- browser/Mmakefile	27 Mar 2005 14:02:19 -0000	1.45
+++ browser/Mmakefile	29 Apr 2005 03:02:41 -0000
@@ -54,14 +54,17 @@
 # change, change ../Mmake.params, or create Mmake.browser.params.
 
 CFLAGS	+=	$(DLL_CFLAGS) -I$(MDBCOMP_DIR) -I$(TRACE_DIR)
+ifeq ($(INSTALLABLE_PREFIX),yes)
 MLFLAGS +=	-R$(FINAL_INSTALL_MERC_LIB_DIR)	\
 		-R$(FINAL_INSTALL_MERC_GC_LIB_DIR)
-MCFLAGS +=	-I $(MDBCOMP_DIR) \
-		-R$(FINAL_INSTALL_MERC_LIB_DIR)	\
+MCFLAGS      += -R$(FINAL_INSTALL_MERC_LIB_DIR)	\
 		-R$(FINAL_INSTALL_MERC_GC_LIB_DIR)
+endif
 MLLIBS +=	$(SOCKET_LIBRARY) $(NSL_LIBRARY) $(DL_LIBRARY)	\
 		$(READLINE_LIBRARIES)
 
+MCFLAGS      += --flags MDB_FLAGS $(CONFIG_OVERRIDE)
+
 #-----------------------------------------------------------------------------#
 
 # Set the install name for Darwin shared libraries.  We disable the
@@ -76,7 +79,6 @@
 # linker, so we disable the mmc option which causes the -install_name option
 # to be passed in the .dep files.
 
-MCFLAGS += --no-shlib-linker-use-install-name
 LD_LIBFLAGS-libmer_browser.dylib = -install_name \
 	$(FINAL_INSTALL_MERC_LIB_DIR)/libmer_browser.dylib
 
@@ -130,7 +132,7 @@
 library: $(LIBS)
 
 .PHONY: depend
-depend:	$(DEPENDS)
+depend:	MDB_FLAGS $(DEPENDS)
 $(DEPENDS): Mercury.modules
 
 .NOTPARALLEL:
@@ -254,7 +256,7 @@
 #-----------------------------------------------------------------------------#
 
 realclean_local:
-	rm -f Mercury.modules tags
+	rm -f Mercury.modules tags MDB_FLAGS MDB_FLAGS.date
 
 #-----------------------------------------------------------------------------#
 
cvs diff: Diffing bytecode
cvs diff: Diffing compiler
Index: compiler/COMP_FLAGS.in
===================================================================
RCS file: compiler/COMP_FLAGS.in
diff -N compiler/COMP_FLAGS.in
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ compiler/COMP_FLAGS.in	11 Apr 2005 08:28:51 -0000
@@ -0,0 +1,23 @@
+ at BOOTSTRAP_MC_ARGS@
+--no-infer-all
+--halt-at-warn
+--no-warn-inferred-erroneous
+--no-mercury-stdlib-dir
+-I../library
+-I../browser
+-I../mdbcomp
+-I../analysis
+--c-include-directory ../boehm_gc
+--c-include-directory ../boehm_gc/include
+--c-include-directory ../runtime
+--c-include-directory ../library
+--c-include-directory ../library/Mercury/mihs
+--c-include-directory ../mdbcomp
+--c-include-directory ../mdbcomp/Mercury/mihs
+--c-include-directory ../browser
+--c-include-directory ../browser/Mercury/mihs
+--c-include-directory ../trace
+--c-include-directory ../analysis
+--no-main
+--linkage shared
+--config-file ../scripts/Mercury.config.bootstrap
Index: compiler/Mmakefile
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/Mmakefile,v
retrieving revision 1.83
diff -u -b -r1.83 Mmakefile
--- compiler/Mmakefile	26 Apr 2005 07:49:21 -0000	1.83
+++ compiler/Mmakefile	29 Apr 2005 03:03:04 -0000
@@ -48,13 +48,11 @@
 $(GCC_MAIN_LIBS): force
 	cd $(GCC_SRC_DIR)/gcc && $(MAKE) mercury_gcc_backend_libs
 
-MCFLAGS +=	-I $(BROWSER_DIR) -I $(MDBCOMP_DIR) -I $(ANALYSIS_DIR) \
-			--c-include-directory $(ANALYSIS_DIR)
+MCFLAGS	     += --flags COMP_FLAGS $(CONFIG_OVERRIDE)
 CFLAGS +=	-I$(ANALYSIS_DIR) -I$(ANALYSIS_DIR)/$(mihs_subdir)
 MLOBJS :=	../main.$O ../analysis/lib$(ANALYSIS_LIB_NAME).$A $(MLOBJS)
 ALL_MLLIBS =	$(MLLIBS) $(EXTRA_MLLIBS) $(GCC_BACKEND_LIBS)
 MLFLAGS +=	--no-main --shared
-MCFLAGS +=	--no-main --linkage shared
 C2INITARGS +=	$(ANALYSIS_DIR)/$(ANALYSIS_LIB_NAME).init
 
 #
@@ -159,7 +157,7 @@
 # mercury_compile
 
 .PHONY: depend
-depend:		$(MC_PROG).depend
+depend:		COMP_FLAGS $(MC_PROG).depend
 
 $(MC_PROG).depend: regenerate_preprocessed_files Mercury.modules
 
@@ -223,7 +221,7 @@
 ifeq ("$(filter il% java%,$(GRADE))","")
 
 .PHONY: depend
-depend:		mlds_to_gcc.depend
+depend:		COMP_FLAGS mlds_to_gcc.depend
 
 mlds_to_gcc.depend: regenerate_preprocessed_files
 
@@ -314,7 +312,7 @@
 
 realclean_local:
 	rm -f tags $(MC_PROG).stats Mercury.modules \
-		mercury_compile$(EXT_FOR_EXE)
+		COMP_FLAGS COMP_FLAGS.date mercury_compile$(EXT_FOR_EXE)
 
 #-----------------------------------------------------------------------------#
 #-----------------------------------------------------------------------------#
cvs diff: Diffing compiler/notes
cvs diff: Diffing debian
cvs diff: Diffing deep_profiler
Index: deep_profiler/DEEP_FLAGS.in
===================================================================
RCS file: deep_profiler/DEEP_FLAGS.in
diff -N deep_profiler/DEEP_FLAGS.in
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ deep_profiler/DEEP_FLAGS.in	11 Apr 2005 08:28:54 -0000
@@ -0,0 +1,20 @@
+ at BOOTSTRAP_MC_ARGS@
+--no-infer-all
+--halt-at-warn
+--no-warn-inferred-erroneous
+--no-mercury-stdlib-dir
+-I../library
+-I../browser
+-I../mdbcomp
+--c-include-directory ../boehm_gc
+--c-include-directory ../boehm_gc/include
+--c-include-directory ../runtime
+--c-include-directory ../library
+--c-include-directory ../library/Mercury/mihs
+--c-include-directory ../mdbcomp
+--c-include-directory ../mdbcomp/Mercury/mihs
+--c-include-directory ../browser
+--c-include-directory ../browser/Mercury/mihs
+--c-include-directory ../trace
+--linkage shared
+--config-file ../scripts/Mercury.config.bootstrap
Index: deep_profiler/Mmakefile
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/deep_profiler/Mmakefile,v
retrieving revision 1.14
diff -u -b -r1.14 Mmakefile
--- deep_profiler/Mmakefile	25 Apr 2005 06:51:57 -0000	1.14
+++ deep_profiler/Mmakefile	29 Apr 2005 03:03:12 -0000
@@ -40,7 +40,7 @@
 #-----------------------------------------------------------------------------#
 
 MLFLAGS += --shared
-MCFLAGS += --linkage shared
+MCFLAGS      += --flags DEEP_FLAGS $(CONFIG_OVERRIDE)
 
 #-----------------------------------------------------------------------------#
 
@@ -48,7 +48,7 @@
 nothing:
 
 .PHONY: depend
-depend:	$(DEPEND)
+depend:	DEEP_FLAGS $(DEPEND)
 
 .PHONY: all
 all:	$(ALL_DEEP_MODULES) $(TAGS_FILE_EXISTS)
@@ -122,7 +122,7 @@
 #-----------------------------------------------------------------------------#
 
 realclean_local:
-	rm -f tags
+	rm -f tags DEEP_FLAGS DEEP_FLAGS.date
 
 #-----------------------------------------------------------------------------#
 
cvs diff: Diffing deep_profiler/notes
cvs diff: Diffing doc
cvs diff: Diffing extras
cvs diff: Diffing extras/aditi
cvs diff: Diffing extras/cgi
cvs diff: Diffing extras/complex_numbers
cvs diff: Diffing extras/complex_numbers/samples
cvs diff: Diffing extras/complex_numbers/tests
cvs diff: Diffing extras/concurrency
cvs diff: Diffing extras/curs
cvs diff: Diffing extras/curs/samples
cvs diff: Diffing extras/curses
cvs diff: Diffing extras/curses/sample
cvs diff: Diffing extras/dynamic_linking
cvs diff: Diffing extras/error
cvs diff: Diffing extras/graphics
cvs diff: Diffing extras/graphics/easyx
cvs diff: Diffing extras/graphics/easyx/samples
cvs diff: Diffing extras/graphics/mercury_glut
cvs diff: Diffing extras/graphics/mercury_opengl
cvs diff: Diffing extras/graphics/mercury_tcltk
cvs diff: Diffing extras/graphics/samples
cvs diff: Diffing extras/graphics/samples/calc
cvs diff: Diffing extras/graphics/samples/gears
cvs diff: Diffing extras/graphics/samples/maze
cvs diff: Diffing extras/graphics/samples/pent
cvs diff: Diffing extras/lazy_evaluation
cvs diff: Diffing extras/lex
cvs diff: Diffing extras/lex/samples
cvs diff: Diffing extras/lex/tests
cvs diff: Diffing extras/logged_output
cvs diff: Diffing extras/moose
cvs diff: Diffing extras/moose/samples
cvs diff: Diffing extras/moose/tests
cvs diff: Diffing extras/morphine
cvs diff: Diffing extras/morphine/non-regression-tests
cvs diff: Diffing extras/morphine/scripts
cvs diff: Diffing extras/morphine/source
cvs diff: Diffing extras/odbc
cvs diff: Diffing extras/posix
cvs diff: Diffing extras/quickcheck
cvs diff: Diffing extras/quickcheck/tutes
cvs diff: Diffing extras/references
cvs diff: Diffing extras/references/samples
cvs diff: Diffing extras/references/tests
cvs diff: Diffing extras/stream
cvs diff: Diffing extras/trailed_update
cvs diff: Diffing extras/trailed_update/samples
cvs diff: Diffing extras/trailed_update/tests
cvs diff: Diffing extras/xml
cvs diff: Diffing extras/xml/samples
cvs diff: Diffing extras/xml_stylesheets
cvs diff: Diffing java
cvs diff: Diffing java/runtime
cvs diff: Diffing library
Index: library/INTER_FLAGS
===================================================================
RCS file: library/INTER_FLAGS
diff -N library/INTER_FLAGS
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ library/INTER_FLAGS	11 Apr 2005 03:22:57 -0000
@@ -0,0 +1,3 @@
+--transitive-intermodule-optimization
+--no-warn-smart-recompilation
+--enable-termination
Index: library/LIB_FLAGS.in
===================================================================
RCS file: library/LIB_FLAGS.in
diff -N library/LIB_FLAGS.in
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ library/LIB_FLAGS.in	11 Apr 2005 08:29:01 -0000
@@ -0,0 +1,19 @@
+ at BOOTSTRAP_MC_ARGS@
+--no-infer-all
+--halt-at-warn
+--no-warn-inferred-erroneous
+--no-mercury-stdlib-dir
+--strict-sequential 
+--generate-mmc-deps
+--no-shlib-linker-use-install-name
+--trace minimum
+--c-include-directory ../boehm_gc
+--c-include-directory ../boehm_gc/include
+--c-include-directory ../runtime
+-L../boehm_gc
+-L../runtime
+-L../library
+-L../trace
+-L../mdbcomp
+-L../browser
+--config-file ../scripts/Mercury.config.bootstrap
Index: library/Mmakefile
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/library/Mmakefile,v
retrieving revision 1.140
diff -u -b -r1.140 Mmakefile
--- library/Mmakefile	17 Feb 2005 06:38:53 -0000	1.140
+++ library/Mmakefile	29 Apr 2005 03:03:29 -0000
@@ -49,37 +49,31 @@
 
 # XXX Smart recompilation doesn't work with `--intermodule-optimization'.
 # We still want to generate version numbers in the interface files, so
-# just disable the warnings here.
-INTERMODULE_OPTS = --transitive-intermodule-optimization \
-			--no-warn-smart-recompilation
-ENABLE_TERM_OPTS = --enable-termination
-CHECK_TERM_OPTS =
+# just disable the warnings in INTER_FLAGS.
 # If you want to actually check termination for the library, then you need
-#	CHECK_TERM_OPTS = --check-termination
-# but that is not enabled by default because it probably just results in
-# spurious warnings.
+# to add --check-termination to INTER_FLAGS, but that is not enabled by default
+# because it probably just results in spurious warnings.
+INTER_FLAGS = --flags INTER_FLAGS
 
 else
 
-INTERMODULE_OPTS =
-ENABLE_TERM_OPTS =
-CHECK_TERM_OPTS =
+INTER_FLAGS =
 
 endif
 
 # We compile the files in the library directory with --trace minimum by
-# default, which has no effect in non-debugging grades and causes the
-# 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
+# default (set in FLAGS), which has no effect in non-debugging grades and
+# causes the 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'.
 
 ifeq ($(LIBRARY_TRACE_MINIMUM),no)
-LIBRARY_TRACE_LEVEL =
+LIBRARY_TRACE_LEVEL = --trace default
 else
-LIBRARY_TRACE_LEVEL = --trace minimum
+LIBRARY_TRACE_LEVEL =
 endif
 
 # We need to compile the library with --strict-sequential for two reasons:
@@ -90,8 +84,8 @@
 # (2) The code for get_determinism in library/exception.m relies on it
 #     (in particular it relies on --no-reorder-disj).
 
-MCFLAGS += --strict-sequential $(LIBRARY_TRACE_LEVEL) --generate-mmc-deps \
-		$(INTERMODULE_OPTS) $(ENABLE_TERM_OPTS) $(CHECK_TERM_OPTS)
+MCFLAGS += --flags LIB_FLAGS $(CONFIG_OVERRIDE)
+MCFLAGS += $(LIBRARY_TRACE_LEVEL) $(INTER_FLAGS)
 
 # The IL and Java implementations of the standard library are not yet complete,
 # so we need to pass `--allow-stubs' to get them to compile.
@@ -104,10 +98,12 @@
 #-----------------------------------------------------------------------------#
 
 CFLAGS	+=	$(DLL_CFLAGS) -I$(TRACE_DIR) -I$(ROBDD_DIR)
+ifeq ($(INSTALLABLE_PREFIX),yes)
 MLFLAGS	+=	-R$(FINAL_INSTALL_MERC_LIB_DIR) \
 		-R$(FINAL_INSTALL_MERC_GC_LIB_DIR)
 MCFLAGS +=	-R$(FINAL_INSTALL_MERC_LIB_DIR) \
 		-R$(FINAL_INSTALL_MERC_GC_LIB_DIR)
+endif
 
 MTAGS	=	$(SCRIPTS_DIR)/mtags
 
@@ -127,7 +123,6 @@
 # linker, so we disable the mmc option which causes the -install_name option
 # to be passed in the .dep files.
 
-MCFLAGS += --no-shlib-linker-use-install-name
 LD_LIBFLAGS-libmer_std.dylib = -install_name \
 	$(FINAL_INSTALL_MERC_LIB_DIR)/libmer_std.dylib
 
@@ -161,7 +156,7 @@
 #-----------------------------------------------------------------------------#
 
 .PHONY: depend
-depend:	$(STD_LIB_NAME).depend
+depend:	LIB_FLAGS $(STD_LIB_NAME).depend
 
 .PHONY: check
 check:	$(STD_LIB_NAME).check
@@ -440,7 +435,7 @@
 	rm -f mercury_dotnet.dll mercury_il.dll
 	rm -f liblibrary.$A liblibrary.so library.init
 	rm -f $($(STD_LIB_NAME).mods:%=%.h)
-	rm -f tags
+	rm -f tags LIB_FLAGS LIB_FLAGS.date
 	rm -f mercury runtime
 	rm -f mr_int.class mr_float.class mr_char.class
 	rm -f mr_int\$$*.class mr_float\$$*.class mr_char\$$*.class
cvs diff: Diffing mdbcomp
Index: mdbcomp/MDBCOMP_FLAGS.in
===================================================================
RCS file: mdbcomp/MDBCOMP_FLAGS.in
diff -N mdbcomp/MDBCOMP_FLAGS.in
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ mdbcomp/MDBCOMP_FLAGS.in	11 Apr 2005 08:29:05 -0000
@@ -0,0 +1,19 @@
+ at BOOTSTRAP_MC_ARGS@
+--no-infer-all
+--halt-at-warn
+--no-warn-inferred-erroneous
+--no-mercury-stdlib-dir
+--no-shlib-linker-use-install-name
+-I../library
+--c-include-directory ../boehm_gc
+--c-include-directory ../boehm_gc/include
+--c-include-directory ../runtime
+--c-include-directory ../library
+--c-include-directory ../library/Mercury/mihs
+-L../boehm_gc
+-L../runtime
+-L../library
+-L../trace
+-L../mdbcomp
+-L../browser
+--config-file ../scripts/Mercury.config.bootstrap
Index: mdbcomp/Mmakefile
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/mdbcomp/Mmakefile,v
retrieving revision 1.6
diff -u -b -r1.6 Mmakefile
--- mdbcomp/Mmakefile	27 Mar 2005 14:02:23 -0000	1.6
+++ mdbcomp/Mmakefile	29 Apr 2005 03:03:39 -0000
@@ -44,10 +44,13 @@
 # change, change ../Mmake.params, or create Mmake.mdbcomp.params.
 
 CFLAGS	+=	$(DLL_CFLAGS) -I$(TRACE_DIR)
+MCFLAGS      += --flags MDBCOMP_FLAGS $(CONFIG_OVERRIDE)
+ifeq ($(INSTALLABLE_PREFIX),yes)
 MLFLAGS +=	-R$(FINAL_INSTALL_MERC_LIB_DIR)	\
 		-R$(FINAL_INSTALL_MERC_GC_LIB_DIR)
 MCFLAGS +=	-R$(FINAL_INSTALL_MERC_LIB_DIR)	\
 		-R$(FINAL_INSTALL_MERC_GC_LIB_DIR)
+endif
 MLLIBS +=	$(SOCKET_LIBRARY) $(NSL_LIBRARY) $(DL_LIBRARY)	\
 		$(READLINE_LIBRARIES)
 
@@ -65,7 +68,6 @@
 # linker, so we disable the mmc option which causes the -install_name option
 # to be passed in the .dep files.
 
-MCFLAGS += --no-shlib-linker-use-install-name
 LD_LIBFLAGS-libmer_mdbcomp.dylib = -install_name \
 	$(FINAL_INSTALL_MERC_LIB_DIR)/libmer_mdbcomp.dylib
 
@@ -119,7 +121,7 @@
 all-ints: $(MDBCOMP_LIB_NAME).int3s $(MDBCOMP_LIB_NAME).ints
 
 .PHONY: depend
-depend:	$(DEPENDS)
+depend:	MDBCOMP_FLAGS $(DEPENDS)
 $(DEPENDS): Mercury.modules
 
 # $(BROWSER_LIB_NAME).dep $(BROWSER_LIB_NAME).depend:
@@ -218,7 +220,7 @@
 #-----------------------------------------------------------------------------#
 
 realclean_local:
-	rm -f Mercury.modules tags
+	rm -f Mercury.modules tags MDBCOMP_FLAGS MDBCOMP_FLAGS.date
 
 #-----------------------------------------------------------------------------#
 
cvs diff: Diffing profiler
Index: profiler/Mmakefile
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/profiler/Mmakefile,v
retrieving revision 1.26
diff -u -b -r1.26 Mmakefile
--- profiler/Mmakefile	14 Jan 2005 05:53:34 -0000	1.26
+++ profiler/Mmakefile	29 Apr 2005 03:01:45 -0000
@@ -20,12 +20,12 @@
 #-----------------------------------------------------------------------------#
 
 MLFLAGS += --shared
-MCFLAGS += --linkage shared
+MCFLAGS += --flags PROF_FLAGS $(CONFIG_OVERRIDE)
 
 #-----------------------------------------------------------------------------#
 
 .PHONY: depend
-depend:	mercury_profile.depend
+depend:	PROF_FLAGS mercury_profile.depend
 
 .PHONY: all
 all:	mercury_profile $(TAGS_FILE_EXISTS)
@@ -79,7 +79,7 @@
 #-----------------------------------------------------------------------------#
 
 realclean_local:
-	rm -f tags
+	rm -f tags PROF_FLAGS PROF_FLAGS.date
 
 #-----------------------------------------------------------------------------#
 
Index: profiler/PROF_FLAGS.in
===================================================================
RCS file: profiler/PROF_FLAGS.in
diff -N profiler/PROF_FLAGS.in
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ profiler/PROF_FLAGS.in	11 Apr 2005 08:29:08 -0000
@@ -0,0 +1,20 @@
+ at BOOTSTRAP_MC_ARGS@
+--no-infer-all
+--halt-at-warn
+--no-warn-inferred-erroneous
+--no-mercury-stdlib-dir
+-I../library
+-I../browser
+-I../mdbcomp
+--c-include-directory ../boehm_gc
+--c-include-directory ../boehm_gc/include
+--c-include-directory ../runtime
+--c-include-directory ../library
+--c-include-directory ../library/Mercury/mihs
+--c-include-directory ../mdbcomp
+--c-include-directory ../mdbcomp/Mercury/mihs
+--c-include-directory ../browser
+--c-include-directory ../browser/Mercury/mihs
+--c-include-directory ../trace
+--linkage shared
+--config-file ../scripts/Mercury.config.bootstrap
cvs diff: Diffing robdd
cvs diff: Diffing runtime
Index: runtime/Mmakefile
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/runtime/Mmakefile,v
retrieving revision 1.120
diff -u -b -r1.120 Mmakefile
--- runtime/Mmakefile	26 Feb 2005 06:30:57 -0000	1.120
+++ runtime/Mmakefile	11 Apr 2005 03:37:52 -0000
@@ -348,7 +348,8 @@
 lib$(RT_LIB_NAME).dylib: $(PIC_OBJS)
 	$(LINK_SHARED_OBJ) $(ERROR_UNDEFINED) 				\
 		-o lib$(RT_LIB_NAME).dylib $(PIC_OBJS)			\
-		-install_name $(FINAL_INSTALL_MERC_LIB_DIR)/lib$(RT_LIB_NAME).dylib \
+		-install_name 						\
+			$(FINAL_INSTALL_MERC_LIB_DIR)/lib$(RT_LIB_NAME).dylib \
 		$(LDFLAGS) $(LDLIBS) $(THREADLIBS)			\
 		$(SHARED_LIBS)
 
@@ -359,7 +360,7 @@
 	cat `vpath_find $(CFILES)` | grep '^INIT ' > $(RT_LIB_NAME).init
 
 mercury_conf.h.date: $(MERCURY_DIR)/config.status mercury_conf.h.in
-	CONFIG_FILES= CONFIG_HEADERS=mercury_conf.h $(MERCURY_DIR)/config.status
+	$(MERCURY_DIR)/config.status --header=mercury_conf.h
 	echo datestamp > mercury_conf.h.date
 
 mercury_conf.h: mercury_conf.h.date
cvs diff: Diffing runtime/GETOPT
cvs diff: Diffing runtime/machdeps
cvs diff: Diffing samples
cvs diff: Diffing samples/c_interface
cvs diff: Diffing samples/c_interface/c_calls_mercury
cvs diff: Diffing samples/c_interface/cplusplus_calls_mercury
cvs diff: Diffing samples/c_interface/mercury_calls_c
cvs diff: Diffing samples/c_interface/mercury_calls_cplusplus
cvs diff: Diffing samples/c_interface/mercury_calls_fortran
cvs diff: Diffing samples/c_interface/simpler_c_calls_mercury
cvs diff: Diffing samples/c_interface/simpler_cplusplus_calls_mercury
cvs diff: Diffing samples/diff
cvs diff: Diffing samples/muz
cvs diff: Diffing samples/rot13
cvs diff: Diffing samples/solutions
cvs diff: Diffing samples/tests
cvs diff: Diffing samples/tests/c_interface
cvs diff: Diffing samples/tests/c_interface/c_calls_mercury
cvs diff: Diffing samples/tests/c_interface/cplusplus_calls_mercury
cvs diff: Diffing samples/tests/c_interface/mercury_calls_c
cvs diff: Diffing samples/tests/c_interface/mercury_calls_cplusplus
cvs diff: Diffing samples/tests/c_interface/mercury_calls_fortran
cvs diff: Diffing samples/tests/c_interface/simpler_c_calls_mercury
cvs diff: Diffing samples/tests/c_interface/simpler_cplusplus_calls_mercury
cvs diff: Diffing samples/tests/diff
cvs diff: Diffing samples/tests/muz
cvs diff: Diffing samples/tests/rot13
cvs diff: Diffing samples/tests/solutions
cvs diff: Diffing samples/tests/toplevel
cvs diff: Diffing scripts
Index: scripts/prepare_tmp_dir_grade_part
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/scripts/prepare_tmp_dir_grade_part,v
retrieving revision 1.1
diff -u -b -r1.1 prepare_tmp_dir_grade_part
--- scripts/prepare_tmp_dir_grade_part	28 Jan 2005 07:11:59 -0000	1.1
+++ scripts/prepare_tmp_dir_grade_part	20 Apr 2005 14:16:21 -0000
@@ -37,15 +37,18 @@
 mkdir tmp_dir/library
 cp library/Mmake* tmp_dir/library
 cp library/Mercury.* tmp_dir/library
+cp library/*FLAGS* tmp_dir/library
 cp library/print_extra_inits tmp_dir/library
 cp library/library_strong_name.sn tmp_dir/library
 cp library/*.m tmp_dir/library
 mkdir tmp_dir/mdbcomp
 cp mdbcomp/Mmake* tmp_dir/mdbcomp
 cp mdbcomp/Mercury.* tmp_dir/mdbcomp
+cp mdbcomp/*FLAGS* tmp_dir/mdbcomp
 cp mdbcomp/*.m tmp_dir/mdbcomp
 mkdir tmp_dir/browser
 cp browser/Mmake* tmp_dir/browser
 cp browser/Mercury.* tmp_dir/browser
+cp browser/*FLAGS* tmp_dir/browser
 cp browser/*.m tmp_dir/browser
 exit 0
cvs diff: Diffing slice
Index: slice/Mmakefile
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/slice/Mmakefile,v
retrieving revision 1.1
diff -u -b -r1.1 Mmakefile
--- slice/Mmakefile	29 Apr 2005 01:03:21 -0000	1.1
+++ slice/Mmakefile	29 Apr 2005 03:01:29 -0000
@@ -25,17 +25,15 @@
 
 VPATH = $(MDBCOMP_DIR) $(LIBRARY_DIR)
 
-MCFLAGS += -I $(MDBCOMP_DIR)
-
 #-----------------------------------------------------------------------------#
 
 MLFLAGS += --shared
-MCFLAGS += --linkage shared
+MCFLAGS += --flags SLICE_FLAGS $(CONFIG_OVERRIDE)
 
 #-----------------------------------------------------------------------------#
 
 .PHONY: depend
-depend:	$(DEPENDS)
+depend:	SLICE_FLAGS $(DEPENDS)
 
 .PHONY: all
 all:	$(MERCURY_MAIN_MODULES) $(TAGS_FILE_EXISTS)
@@ -97,7 +95,7 @@
 #-----------------------------------------------------------------------------#
 
 realclean_local:
-	rm -f tags
+	rm -f tags SLICE_FLAGS SLICE_FLAGS.date
 
 #-----------------------------------------------------------------------------#
 
Index: slice/SLICE_FLAGS.in
===================================================================
RCS file: slice/SLICE_FLAGS.in
diff -N slice/SLICE_FLAGS.in
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ slice/SLICE_FLAGS.in	29 Apr 2005 02:55:59 -0000
@@ -0,0 +1,20 @@
+ at BOOTSTRAP_MC_ARGS@
+--no-infer-all
+--halt-at-warn
+--no-warn-inferred-erroneous
+--no-mercury-stdlib-dir
+-I../library
+-I../browser
+-I../mdbcomp
+--c-include-directory ../boehm_gc
+--c-include-directory ../boehm_gc/include
+--c-include-directory ../runtime
+--c-include-directory ../library
+--c-include-directory ../library/Mercury/mihs
+--c-include-directory ../mdbcomp
+--c-include-directory ../mdbcomp/Mercury/mihs
+--c-include-directory ../browser
+--c-include-directory ../browser/Mercury/mihs
+--c-include-directory ../trace
+--linkage shared
+--config-file ../scripts/Mercury.config.bootstrap
cvs diff: Diffing tests
Index: tests/Mmake.common
===================================================================
RCS file: /home/mercury/mercury1/repository/tests/Mmake.common,v
retrieving revision 1.44
diff -u -b -r1.44 Mmake.common
--- tests/Mmake.common	24 Mar 2005 01:58:08 -0000	1.44
+++ tests/Mmake.common	12 Apr 2005 02:39:59 -0000
@@ -34,7 +34,9 @@
 # file by setting both GRADEFLAGS-foo.
 #
 
+ifndef DIFF_OPTS
 DIFF_OPTS=-c
+endif
 
 # Override this with `RUN_RECOMPILATION_TESTS=no'
 # if your compiler cannot run smart recompilation.
@@ -69,6 +71,11 @@
 endif
 
 -include $(TESTS_DIR)/Mmake.params
+
+MCFLAGS += --flags $(TESTS_DIR)/TESTS_FLAGS
+ifdef WORKSPACE_FLAGS
+MCFLAGS += --flags $(TESTS_DIR)/WS_FLAGS
+endif
 
 # Avoid trying to make this file with `mmc --make' if it doesn't exist.
 $(TESTS_DIR)/Mmake.params: ;
Index: tests/TESTS_FLAGS.in
===================================================================
RCS file: tests/TESTS_FLAGS.in
diff -N tests/TESTS_FLAGS.in
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ tests/TESTS_FLAGS.in	11 Apr 2005 13:46:58 -0000
@@ -0,0 +1 @@
+ at BOOTSTRAP_MC_ARGS@
Index: tests/WS_FLAGS.ws
===================================================================
RCS file: tests/WS_FLAGS.ws
diff -N tests/WS_FLAGS.ws
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ tests/WS_FLAGS.ws	29 Apr 2005 04:38:41 -0000
@@ -0,0 +1,16 @@
+--no-mercury-stdlib-dir
+-I at WORKSPACE@/library
+-I at WORKSPACE@/browser
+-I at WORKSPACE@/mdbcomp
+--c-include-directory @WORKSPACE@/boehm_gc
+--c-include-directory @WORKSPACE@/boehm_gc/include
+--c-include-directory @WORKSPACE@/runtime
+--c-include-directory @WORKSPACE@/library
+--c-include-directory @WORKSPACE@/library/Mercury/mihs
+--c-include-directory @WORKSPACE@/mdbcomp
+--c-include-directory @WORKSPACE@/mdbcomp/Mercury/mihs
+--c-include-directory @WORKSPACE@/browser
+--c-include-directory @WORKSPACE@/browser/Mercury/mihs
+--c-include-directory @WORKSPACE@/trace
+--linkage shared
+--config-file @WORKSPACE@/scripts/Mercury.config.bootstrap
cvs diff: Diffing tests/benchmarks
cvs diff: Diffing tests/debugger
cvs diff: Diffing tests/debugger/declarative
cvs diff: Diffing tests/dppd
cvs diff: Diffing tests/general
cvs diff: Diffing tests/general/accumulator
cvs diff: Diffing tests/general/string_format
cvs diff: Diffing tests/general/structure_reuse
cvs diff: Diffing tests/grade_subdirs
cvs diff: Diffing tests/hard_coded
cvs diff: Diffing tests/hard_coded/exceptions
cvs diff: Diffing tests/hard_coded/purity
cvs diff: Diffing tests/hard_coded/sub-modules
cvs diff: Diffing tests/hard_coded/typeclasses
cvs diff: Diffing tests/invalid
Index: tests/invalid/Mercury.options
===================================================================
RCS file: /home/mercury/mercury1/repository/tests/invalid/Mercury.options,v
retrieving revision 1.10
diff -u -b -r1.10 Mercury.options
--- tests/invalid/Mercury.options	20 Apr 2005 12:57:43 -0000	1.10
+++ tests/invalid/Mercury.options	26 Apr 2005 10:22:57 -0000
@@ -49,6 +49,7 @@
 				--no-automatic-intermodule-optimization
 MCFLAGS-impure_method_impl =	--no-intermodule-optimization \
 				--no-automatic-intermodule-optimization
+MCFLAGS-loopcheck =		--warn-inferred-erroneous
 MCFLAGS-method_impl =		--no-intermodule-optimization \
 				--no-automatic-intermodule-optimization
 MCFLAGS-missing_det_decls =	--no-infer-det
@@ -64,9 +65,10 @@
 MCFLAGS-nonexistent_import =    --no-verbose-make --make nonexistent_import
 MCFLAGS-overloading = 		--no-intermodule-optimization \
 				--no-automatic-intermodule-optimization
+MCFLAGS-pragma_c_code_no_det =	--warn-inferred-erroneous
+MCFLAGS-record_syntax_errors =	--verbose-error-messages
 MCFLAGS-sub_c = 	--verbose-error-messages --no-intermodule-optimization \
 				--no-automatic-intermodule-optimization
-MCFLAGS-record_syntax_errors =	--verbose-error-messages
 MCFLAGS-test_nested =		--no-intermodule-optimization \
 				--no-automatic-intermodule-optimization
 MCFLAGS-transitive_import = --no-intermodule-optimization \
cvs diff: Diffing tests/invalid/purity
cvs diff: Diffing tests/misc_tests
cvs diff: Diffing tests/mmc_make
cvs diff: Diffing tests/mmc_make/lib
cvs diff: Diffing tests/recompilation
cvs diff: Diffing tests/tabling
cvs diff: Diffing tests/term
cvs diff: Diffing tests/valid
cvs diff: Diffing tests/warnings
Index: tests/warnings/Mmakefile
===================================================================
RCS file: /home/mercury/mercury1/repository/tests/warnings/Mmakefile,v
retrieving revision 1.37
diff -u -b -r1.37 Mmakefile
--- tests/warnings/Mmakefile	24 Mar 2005 05:34:41 -0000	1.37
+++ tests/warnings/Mmakefile	13 Apr 2005 04:15:31 -0000
@@ -48,6 +48,8 @@
 # `.err' files, not stderr.
 MCFLAGS += --output-compile-error-lines 0
 
+MCFLAGS += --infer-all
+
 $(COMPILE_PROGS:%=%.runtest): %.runtest: %.res_compile ;
 
 $(ERRORCHECK_PROGS:%=%.runtest): %.runtest: %.res_error ;
cvs diff: Diffing tools
Index: tools/bootcheck
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/tools/bootcheck,v
retrieving revision 1.169
diff -u -b -r1.169 bootcheck
--- tools/bootcheck	29 Apr 2005 01:03:27 -0000	1.169
+++ tools/bootcheck	29 Apr 2005 01:09:33 -0000
@@ -566,8 +566,9 @@
 	MERCURY_COMPILER=$root/compiler/mercury_compile
 	export MERCURY_COMPILER
 
-	MERCURY_CONFIG_FILE=$root/scripts/Mercury.config
-	export MERCURY_CONFIG_FILE
+	# now in FLAGS files
+	# MERCURY_CONFIG_FILE=$root/scripts/Mercury.config
+	# export MERCURY_CONFIG_FILE
 
 	test -d $stage2dir || mkdir $stage2dir
 	if $keep_stage_2
@@ -604,6 +605,7 @@
 		$LN_S $root/compiler/notes .
 
 		cp $root/compiler/Mmake* $root/compiler/Mercury.options .
+		cp $root/compiler/*_FLAGS* .
 		cd $root/$stage2dir
 		mkdir library
 		cd library
@@ -613,6 +615,7 @@
 		$LN $root/library/library_strong_name.sn .
 		$LN_S $root/library/print_extra_inits .
 		cp $root/library/Mmake* $root/library/Mercury.options .
+		cp $root/library/*_FLAGS* .
 		$LN_S $root/library/$STD_LIB_NAME.init .
 		$LN_S $root/library/RESERVED_MACRO_NAMES .
 		cd $root/$stage2dir
@@ -620,6 +623,7 @@
 		cd mdbcomp
 		$LN_S $root/mdbcomp/*.m .
 		cp $root/mdbcomp/Mmake* $root/mdbcomp/Mercury.options .
+		cp $root/mdbcomp/*_FLAGS* .
 		$LN_S $root/mdbcomp/$MDCOMP_LIB_NAME.init .
 		$LN_S $root/mdbcomp/RESERVED_MACRO_NAMES .
 		cd $root/$stage2dir
@@ -627,6 +631,7 @@
 		cd browser
 		$LN_S $root/browser/*.m .
 		cp $root/browser/Mmake* $root/browser/Mercury.options .
+		cp $root/browser/*_FLAGS* .
 		$LN_S $root/browser/$BROWSER_LIB_NAME.init .
 		$LN_S $root/browser/RESERVED_MACRO_NAMES .
 		cd $root/$stage2dir
@@ -634,6 +639,7 @@
 		cd analysis
 		$LN_S $root/analysis/*.m .
 		cp $root/analysis/Mmake* $root/analysis/Mercury.options .
+		cp $root/analysis/*_FLAGS* .
 		$LN_S $root/analysis/$ANALYSIS_LIB_NAME.init .
 
 		cd $root/$stage2dir
@@ -721,12 +727,14 @@
 			cd profiler
 			$LN_S $root/profiler/*.m .
 			cp $root/profiler/Mmake* $root/profiler/Mercury.options .
+			cp $root/profiler/*_FLAGS* .
 			cd $root/$stage2dir
 			mkdir deep_profiler
 			cd deep_profiler
 			$LN_S $root/deep_profiler/*.m .
 			cp $root/deep_profiler/Mmake* .
 			cp $root/deep_profiler/Mercury.options .
+			cp $root/deep_profiler/*_FLAGS* .
 			cd $root/$stage2dir
 		else
 			$LN_S $root/slice .
@@ -1022,6 +1030,7 @@
 	$LN_S $root/compiler/notes .
 
 	cp $root/compiler/Mmake* $root/compiler/Mercury.options .
+	cp $root/compiler/*_FLAGS* .
 	cd $root/$stage3dir
 	mkdir library
 	cd library
@@ -1030,24 +1039,28 @@
 	$LN_S $root/library/print_extra_inits .
 	$LN_S $root/library/library_strong_name.sn .
 	cp $root/library/Mmake* $root/library/Mercury.options .
+	cp $root/library/*_FLAGS* .
 	$LN_S $root/library/$STD_LIB_NAME.init .
 	cd $root/$stage3dir
 	mkdir mdbcomp
 	cd mdbcomp
 	$LN_S $root/mdbcomp/*.m .
 	cp $root/mdbcomp/Mmake* $root/mdbcomp/Mercury.options .
+	cp $root/mdbcomp/*_FLAGS* .
 	$LN_S $root/mdbcomp/$MDBCOMP_LIB_NAME.init .
 	cd $root/$stage3dir
 	mkdir browser
 	cd browser
 	$LN_S $root/browser/*.m .
 	cp $root/browser/Mmake* $root/browser/Mercury.options .
+	cp $root/browser/*_FLAGS* .
 	$LN_S $root/browser/$BROWSER_LIB_NAME.init .
 	cd $root/$stage3dir
 	mkdir analysis
 	cd analysis
 	$LN_S $root/analysis/*.m .
 	cp $root/analysis/Mmake* $root/analysis/Mercury.options .
+	cp $root/analysis/*_FLAGS* .
 	$LN_S $root/analysis/$ANALYSIS_LIB_NAME.init .
 	cd $root/$stage3dir
 	$LN_S $root/$stage2dir/boehm_gc .
@@ -1316,8 +1329,9 @@
 	MERCURY_COMPILER=$root/$stage2dir/compiler/mercury_compile
 	export MERCURY_COMPILER
 
-	MERCURY_CONFIG_FILE=$root/scripts/Mercury.config
-	export MERCURY_CONFIG_FILE
+	# now in FLAGS files
+	# MERCURY_CONFIG_FILE=$root/scripts/Mercury.config
+	# export MERCURY_CONFIG_FILE
 
 	if test "$test_grade" = "$grade"
 	then
@@ -1341,6 +1355,12 @@
 
 # Run the tests in the tests/* directories
 
+if test -s $HOME/.bootcheck_diff_opts
+then
+	DIFF_OPTS=`cat $HOME/.bootcheck_diff_opts`
+	export DIFF_OPTS
+fi
+
 test_status=0
 if $runtests
 then
@@ -1386,6 +1406,13 @@
 		fi
 
 		cp $root/doc/mdb_command_test.inp ${tests_prefix}tests/debugger
+
+		sed -e "s:@WORKSPACE@:$WORKSPACE:" \
+			< ${tests_prefix}tests/WS_FLAGS.ws \
+			> ${tests_prefix}tests/WS_FLAGS
+
+		WORKSPACE_FLAGS=yes
+		export WORKSPACE_FLAGS
 
 		case $error_file_only in
 			true)
cvs diff: Diffing trace
cvs diff: Diffing util
cvs diff: Diffing vim
cvs diff: Diffing vim/after
cvs diff: Diffing vim/ftplugin
cvs diff: Diffing vim/syntax
--------------------------------------------------------------------------
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