Remove most of the junk from the command lines executed by make when building

Estimated hours taken: 12
Branches: main

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.

*/.nocopyright:
	Don't require copyright notices in FLAGS files, since that would make
	them invalid.

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/invalid/*.err2:
	Update these expected files to account for the use of error_util
	in error messages by previous changes to the compiler. These expected
	output files are used only with --use-subdirs.

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.

scripts/mgnuc.in:
	Provide a mechanism, a per-directory .mgnuc_opts file, for specifying
	the options that are required for every C file in a directory. The
	intention is to use this for -I../library etc, but this is not done
	yet; one thing at a time.

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.

	Move the setting of MMAKE_USE_SUBDIRS and MMAKE_USE_MMC_MAKE after
	we have built stage1, and always copy the profilers if --use-subdirs
	is set. The old ways of doing things caused problems if bootcheck
	was given --use-subdirs but stage1 doesn't use subdirs: the bootcheck
	modified the stage1 slice, profiler and deep_profiler directories.
This commit is contained in:
Zoltan Somogyi
2005-05-06 08:42:37 +00:00
parent 7ab6043c76
commit d56de30e9d
40 changed files with 1657 additions and 1359 deletions

View File

@@ -29,7 +29,7 @@ include $(MERCURY_DIR)/Mmake.workspace
#-----------------------------------------------------------------------------#
# 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 @@ SHARED_LIBS = @SHARED_LIBS@
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 @@ FINAL_INSTALL_MERC_GC_LIB_DIR = $(FINAL_INSTALL_MERC_GRADELESS_LIB_DIR)
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
@@ -458,6 +461,13 @@ clean_check:
-rm -f $(OBJ_CHECKS)
endif
# ifdef CHECK_OBJS
# the endif is for "ifdef CHECK_OBJS" a long way above
#-----------------------------------------------------------------------------#
%_FLAGS: %_FLAGS.in ../config.status
@if test -f $*_FLAGS; then chmod u+w $*_FLAGS; fi
@../config.status --file $*_FLAGS
@chmod a-w $*_FLAGS
#-----------------------------------------------------------------------------#

View File

@@ -101,39 +101,42 @@ MTAGSFLAGS += $(EXTRA_MTAGSFLAGS)
VPATH = $(LIBRARY_DIR)
ifeq ($(origin MERCURY_CONFIG_FILE),undefined)
MERCURY_CONFIG_FILE = $(SCRIPTS_DIR)/Mercury.config.bootstrap
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
MCFLAGS += --options-file $(WORKSPACE)/Mercury.options
endif
MCFLAGS += --no-mercury-stdlib-dir -I$(LIBRARY_DIR)
MGNUCFLAGS += --no-mercury-stdlib-dir
C2INITFLAGS += --trace-init-file $(BROWSER_DIR)/$(BROWSER_LIB_NAME).init \
# 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
C2INITARGS += $(LIBRARY_DIR)/$(STD_LIB_NAME).init \
C2INITARGS += $(LIBRARY_DIR)/$(STD_LIB_NAME).init \
$(RUNTIME_DIR)/$(RT_LIB_NAME).init
MLFLAGS += --no-mercury-stdlib-dir
MLFLAGS += --no-mercury-stdlib-dir
#
# Work out the C include directories.
#
C_INCL_DIRS = -I$(BOEHM_GC_DIR) -I$(BOEHM_GC_DIR)/include -I$(MPS_GC_DIR)
C_INCL_DIRS = -I$(BOEHM_GC_DIR) -I$(BOEHM_GC_DIR)/include -I$(MPS_GC_DIR)
ifneq ($(LINK_BOEHM_GC_ONLY),yes)
C_INCL_DIRS += -I$(RUNTIME_DIR)
C_INCL_DIRS += -I$(RUNTIME_DIR)
ifneq ($(LINK_RUNTIME_ONLY),yes)
C_INCL_DIRS += -I$(LIBRARY_DIR) -I$(LIBRARY_DIR)/$(mihs_subdir)
C_INCL_DIRS += -I$(LIBRARY_DIR) -I$(LIBRARY_DIR)/$(mihs_subdir)
ifneq ($(LINK_STDLIB_ONLY),yes)
C_INCL_DIRS += -I$(MDBCOMP_DIR) -I$(MDBCOMP_DIR)/$(mihs_subdir) \
C_INCL_DIRS += -I$(MDBCOMP_DIR) -I$(MDBCOMP_DIR)/$(mihs_subdir) \
-I$(BROWSER_DIR) -I$(BROWSER_DIR)/$(mihs_subdir) -I$(TRACE_DIR)
endif
endif
endif
CFLAGS += $(C_INCL_DIRS)
MCFLAGS += $(C_INCL_DIRS:-I%=--c-include-directory %)
CFLAGS += $(C_INCL_DIRS)
# now in FLAGS files
# MCFLAGS += $(C_INCL_DIRS:-I%=--c-include-directory %)
#
# Work out the .NET directories
@@ -214,13 +217,14 @@ LIB_DIR_OPTS = -L$(BOEHM_GC_DIR) -L$(MPS_GC_DIR) -L$(RUNTIME_DIR) \
-L$(LIBRARY_DIR) -L$(TRACE_DIR) -L$(MDBCOMP_DIR) \
-L$(BROWSER_DIR)
MLFLAGS += $(LIB_DIR_OPTS)
MCFLAGS += $(LIB_DIR_OPTS)
MLLIBS += $(LINK_LIB_OPTS)
MLFLAGS += $(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

View File

@@ -344,7 +344,7 @@ config.status: configure VERSION
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

View File

@@ -1 +1,2 @@
.cvsignore
ANALYSIS_FLAGS.in

View File

@@ -0,0 +1,20 @@
@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

View File

@@ -23,12 +23,11 @@ MERCURY_MAIN_MODULES=$(ANALYSIS_LIB_NAME)
# 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
MTAGS = $(SCRIPTS_DIR)/mtags
LN = ln
LN = ln
#-----------------------------------------------------------------------------#
@@ -47,6 +46,8 @@ DLL_DEF_LIB =
endif
MCFLAGS += --flags ANALYSIS_FLAGS $(CONFIG_OVERRIDE)
#-----------------------------------------------------------------------------#
# targets
@@ -56,7 +57,7 @@ all: library $(TAGS_FILE_EXISTS)
DEPENDS = $(ANALYSIS_LIB_NAME).depend
.PHONY: depend
depend: $(DEPENDS)
depend: ANALYSIS_FLAGS $(DEPENDS)
.PHONY: check
check: $(ANALYSIS_LIB_NAME).check
@@ -113,6 +114,11 @@ library: lib$(ANALYSIS_LIB_NAME)
#-----------------------------------------------------------------------------#
realclean_local:
rm -f ANALYSIS_FLAGS ANALYSIS_FLAGS.date
#-----------------------------------------------------------------------------#
# Installation targets
.PHONY: install

View File

@@ -1 +1,2 @@
.cvsignore
MDB_FLAGS.in

23
browser/MDB_FLAGS.in Normal file
View File

@@ -0,0 +1,23 @@
@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../mdbcomp
-I../browser
--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

View File

@@ -53,15 +53,20 @@ CHECKS = $(patsubst %,%.check,$(MERCURY_MAIN_LIB_MODULES))
# Don't change these without good reason - if you want to do a temporary
# change, change ../Mmake.params, or create Mmake.browser.params.
CFLAGS += $(DLL_CFLAGS) -I$(MDBCOMP_DIR) -I$(TRACE_DIR)
MLFLAGS += -R$(FINAL_INSTALL_MERC_LIB_DIR) \
CFLAGS += $(DLL_CFLAGS) \
-I$(MDBCOMP_DIR) -I$(MDBCOMP_DIR)/$(mihs_subdir) \
-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)
MLLIBS += $(SOCKET_LIBRARY) $(NSL_LIBRARY) $(DL_LIBRARY) \
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 +81,6 @@ MLLIBS += $(SOCKET_LIBRARY) $(NSL_LIBRARY) $(DL_LIBRARY) \
# 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
@@ -84,9 +88,9 @@ LD_LIBFLAGS-libmer_browser.dylib = -install_name \
JAVACFLAGS = -classpath $(LIBRARY_DIR)
MTAGS = $(SCRIPTS_DIR)/mtags
MTAGS = $(SCRIPTS_DIR)/mtags
LN = ln
LN = ln
#-----------------------------------------------------------------------------#
@@ -130,7 +134,7 @@ all: library $(TAGS_FILE_EXISTS) browse_test declarative_test
library: $(LIBS)
.PHONY: depend
depend: $(DEPENDS)
depend: MDB_FLAGS $(DEPENDS)
$(DEPENDS): Mercury.modules
.NOTPARALLEL:
@@ -165,7 +169,7 @@ $(DEPENDS): Mercury.modules
# name doesn't match the file name, so smart recompilation
# won't work without the Mercury.modules file.
.PHONY: Mercury.modules
Mercury.modules:
Mercury.modules: MDB_FLAGS
$(MC) $(ALL_GRADEFLAGS) $(ALL_MCFLAGS) -f *.m
.PHONY: check
@@ -254,7 +258,7 @@ $(os_subdir)mdb.pic_o \
#-----------------------------------------------------------------------------#
realclean_local:
rm -f Mercury.modules tags
rm -f Mercury.modules tags MDB_FLAGS MDB_FLAGS.date
#-----------------------------------------------------------------------------#

View File

@@ -1 +1,2 @@
.cvsignore
COMP_FLAGS.in

23
compiler/COMP_FLAGS.in Normal file
View File

@@ -0,0 +1,23 @@
@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

View File

@@ -48,14 +48,12 @@ force: ;
$(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)
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
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
C2INITARGS += $(ANALYSIS_DIR)/$(ANALYSIS_LIB_NAME).init
#
# Work-around for a fixed limit: on alpha-dec-osf3.2, if we compile with
@@ -124,12 +122,12 @@ endif
#
ifeq ($(ENABLE_GCC_BACK_END),yes)
# Remove the #if line and everything between the #else and #endif lines.
GCC_SED_EXPR = -e "/^$${hash}if *ENABLE_GCC_BACK_END/s/.*//" \
GCC_SED_EXPR = -e "/^$${hash}if *ENABLE_GCC_BACK_END/s/.*//" \
-e "/^$${hash}else/,/^$${hash}endif/s/.*//"
else
# Remove everything between the #if line and the #else line,
# and the #endif line.
GCC_SED_EXPR = -e "/^$${hash}if *ENABLE_GCC_BACK_END/,/^$${hash}else/s/.*//" \
GCC_SED_EXPR = -e "/^$${hash}if *ENABLE_GCC_BACK_END/,/^$${hash}else/s/.*//" \
-e "/^$${hash}endif/s/.*//"
endif
@@ -161,13 +159,13 @@ MC_PROG = top_level
.PHONY: depend
depend: $(MC_PROG).depend
$(MC_PROG).depend: regenerate_preprocessed_files Mercury.modules
$(MC_PROG).depend: regenerate_preprocessed_files Mercury.modules COMP_FLAGS
# This directory contains source files for which the module
# name doesn't match the file name, so smart recompilation
# won't work without the Mercury.modules file.
.PHONY: Mercury.modules
Mercury.modules:
Mercury.modules: COMP_FLAGS
$(MC) $(ALL_GRADEFLAGS) $(ALL_MCFLAGS) -f *.m
.PHONY: all
@@ -223,7 +221,7 @@ mercury_compile_init.$O: $(MC_PROG)_init.$O
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 @@ clean_local:
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)
#-----------------------------------------------------------------------------#
#-----------------------------------------------------------------------------#

View File

@@ -91,9 +91,18 @@ AC_DEFINE_UNQUOTED(MR_FULLARCH, "$FULLARCH")
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 @@ fi
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 @@ scripts/prepare_tmp_dir_fixed_part
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

View File

@@ -1,2 +1,3 @@
.cvsignore
DESIGN
DEEP_FLAGS.in

View File

@@ -0,0 +1,20 @@
@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

View File

@@ -40,7 +40,7 @@ Mmake.deep.params: ;
#-----------------------------------------------------------------------------#
MLFLAGS += --shared
MCFLAGS += --linkage shared
MCFLAGS += --flags DEEP_FLAGS $(CONFIG_OVERRIDE)
#-----------------------------------------------------------------------------#
@@ -50,6 +50,8 @@ nothing:
.PHONY: depend
depend: $(DEPEND)
$(DEPEND): DEEP_FLAGS
.PHONY: all
all: $(ALL_DEEP_MODULES) $(TAGS_FILE_EXISTS)
@@ -122,7 +124,7 @@ cs: $(mdprof_dump.cs) $(cs_subdir)mdprof_dump_init.c
#-----------------------------------------------------------------------------#
realclean_local:
rm -f tags
rm -f tags DEEP_FLAGS DEEP_FLAGS.date
#-----------------------------------------------------------------------------#

View File

@@ -1,2 +1,4 @@
.cvsignore
library_strong_name.sn
INTER_FLAGS
LIB_FLAGS.in

3
library/INTER_FLAGS Normal file
View File

@@ -0,0 +1,3 @@
--transitive-intermodule-optimization
--no-warn-smart-recompilation
--enable-termination

19
library/LIB_FLAGS.in Normal file
View File

@@ -0,0 +1,19 @@
@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

View File

@@ -49,37 +49,31 @@ ifeq ($(LIBRARY_INTERMODULE),yes)
# 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 @@ endif
# (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.
@@ -103,15 +97,17 @@ endif
#-----------------------------------------------------------------------------#
CFLAGS += $(DLL_CFLAGS) -I$(TRACE_DIR) -I$(ROBDD_DIR)
MLFLAGS += -R$(FINAL_INSTALL_MERC_LIB_DIR) \
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) \
MCFLAGS += -R$(FINAL_INSTALL_MERC_LIB_DIR) \
-R$(FINAL_INSTALL_MERC_GC_LIB_DIR)
endif
MTAGS = $(SCRIPTS_DIR)/mtags
MTAGS = $(SCRIPTS_DIR)/mtags
LN = ln
LN = ln
#-----------------------------------------------------------------------------#
@@ -127,7 +123,6 @@ LN = ln
# 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 @@ mercury: lib_std
#-----------------------------------------------------------------------------#
.PHONY: depend
depend: $(STD_LIB_NAME).depend
depend: LIB_FLAGS $(STD_LIB_NAME).depend
.PHONY: check
check: $(STD_LIB_NAME).check
@@ -442,7 +437,7 @@ realclean_local:
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

View File

@@ -1 +1,2 @@
.cvsignore
MDBCOMP_FLAGS.in

19
mdbcomp/MDBCOMP_FLAGS.in Normal file
View File

@@ -0,0 +1,19 @@
@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

View File

@@ -43,12 +43,15 @@ CHECKS = $(patsubst %,%.check,$(MERCURY_MAIN_LIB_MODULES))
# Don't change these without good reason - if you want to do a temporary
# change, change ../Mmake.params, or create Mmake.mdbcomp.params.
CFLAGS += $(DLL_CFLAGS) -I$(TRACE_DIR)
MLFLAGS += -R$(FINAL_INSTALL_MERC_LIB_DIR) \
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) \
MCFLAGS += -R$(FINAL_INSTALL_MERC_LIB_DIR) \
-R$(FINAL_INSTALL_MERC_GC_LIB_DIR)
MLLIBS += $(SOCKET_LIBRARY) $(NSL_LIBRARY) $(DL_LIBRARY) \
endif
MLLIBS += $(SOCKET_LIBRARY) $(NSL_LIBRARY) $(DL_LIBRARY) \
$(READLINE_LIBRARIES)
#-----------------------------------------------------------------------------#
@@ -65,7 +68,6 @@ MLLIBS += $(SOCKET_LIBRARY) $(NSL_LIBRARY) $(DL_LIBRARY) \
# 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
@@ -73,9 +75,9 @@ LD_LIBFLAGS-libmer_mdbcomp.dylib = -install_name \
JAVACFLAGS = -classpath $(LIBRARY_DIR)
MTAGS = $(SCRIPTS_DIR)/mtags
MTAGS = $(SCRIPTS_DIR)/mtags
LN = ln
LN = ln
#-----------------------------------------------------------------------------#
@@ -119,7 +121,7 @@ library: $(LIBS)
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:
@@ -129,7 +131,7 @@ $(DEPENDS): Mercury.modules
# name doesn't match the file name, so smart recompilation
# won't work without the Mercury.modules file.
.PHONY: Mercury.modules
Mercury.modules:
Mercury.modules: MDBCOMP_FLAGS
$(MC) $(ALL_GRADEFLAGS) $(ALL_MCFLAGS) -f *.m
.PHONY: check
@@ -218,7 +220,7 @@ $(os_subdir)mdb.pic_o \
#-----------------------------------------------------------------------------#
realclean_local:
rm -f Mercury.modules tags
rm -f Mercury.modules tags MDBCOMP_FLAGS MDBCOMP_FLAGS.date
#-----------------------------------------------------------------------------#

View File

@@ -1 +1,2 @@
.cvsignore
PROF_FLAGS.in

View File

@@ -20,13 +20,15 @@ MERCURY_MAIN_MODULES=mercury_profile
#-----------------------------------------------------------------------------#
MLFLAGS += --shared
MCFLAGS += --linkage shared
MCFLAGS += --flags PROF_FLAGS $(CONFIG_OVERRIDE)
#-----------------------------------------------------------------------------#
.PHONY: depend
depend: mercury_profile.depend
mercury_profile.depend: PROF_FLAGS
.PHONY: all
all: mercury_profile $(TAGS_FILE_EXISTS)
@@ -79,7 +81,7 @@ ils: $(mercury_profile.ils)
#-----------------------------------------------------------------------------#
realclean_local:
rm -f tags
rm -f tags PROF_FLAGS PROF_FLAGS.date
#-----------------------------------------------------------------------------#

20
profiler/PROF_FLAGS.in Normal file
View File

@@ -0,0 +1,20 @@
@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

View File

@@ -134,7 +134,7 @@ MACHHDRS = machdeps/no_regs.h \
# MCPP_HDRS are header files in Microsoft's Managed extensions for C++
MCPP_HDRS = mercury_mcpp.h
MCPP_HDRS = mercury_mcpp.h
# keep this list in alphabetical order, please
CFILES = \
@@ -214,8 +214,8 @@ CFLAGS += $(DLL_CFLAGS) -DMERCURY_BOOTSTRAP_H -DMERCURY_CONF_BOOTSTRAP_H
# We intentionally compile with C level debugging enabled so that problems
# in the runtime can be debugged without having to recompile it. The cost
# of doing this is negligible. The runtime can be compiled without
# debugging enabled by removing the `--c-debug' flag below.
# of doing this is negligible. The runtime can be compiled without
# debugging enabled by removing the `--c-debug' flag below.
MGNUCFLAGS += --c-debug --no-ansi
#-----------------------------------------------------------------------------#
@@ -290,7 +290,7 @@ mercury_profiling_builtin.h: mercury_deep_call_port_body.h \
.PHONY: all
all: runtime $(TAGS_FILE_EXISTS)
ifeq ($(findstring java,$(GRADE)),java)
ifeq ($(findstring java,$(GRADE)),java)
#
# For grade java, there's nothing to do
@@ -299,7 +299,7 @@ runtime:
@echo "No Mercury runtime needed for grade=java"
else
ifeq ($(findstring il,$(GRADE)),il)
ifeq ($(findstring il,$(GRADE)),il)
# Managed C++ files compiled in this directory should not be put in an
# assembly of their own. We put the runtime and library dlls into a single
@@ -312,7 +312,7 @@ DOTNET_DLLS=mercury_il.dll mercury_dotnet.dll
clean_local:
rm -f $(DOTNET_DLLS)
runtime: $(DOTNET_DLLS)
mercury_dotnet.dll: mercury_il.dll $(MCPP_HDRS)
@@ -323,7 +323,7 @@ mercury_dotnet.dll: mercury_il.dll $(MCPP_HDRS)
# sed '/REMOVE FOR ROTOR/s@^@//@' mercury_il.il > mercury_il.rotor.il
# $(MS_ILASM) $(ALL_MS_ILASMFLAGS) /dll /quiet /OUT=mercury_il.dll \
# mercury_il.rotor.il
else
.PHONY: runtime
@@ -348,7 +348,8 @@ lib$(RT_LIB_NAME).so: $(PIC_OBJS)
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 @@ $(RT_LIB_NAME).init: $(CFILES)
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
@@ -393,33 +394,33 @@ install_dirs:
-[ -d $(INSTALL_RECONF_DIR)/runtime ] || \
mkdir -p $(INSTALL_RECONF_DIR)/runtime
ifeq ($(findstring java,$(GRADE)),java)
ifeq ($(findstring java,$(GRADE)),java)
# For grade java, there's nothing to do.
# (The java version of the Mercury runtime is in mercury/java/runtime,
# not mercury/runtime, and its build and installation is handled by
# mercury/library/Mmakefile.)
.PHONY: install_headers
.PHONY: install_headers
install_headers:
.PHONY: install_init
.PHONY: install_init
install_init:
.PHONY: install_lib
.PHONY: install_lib
install_lib:
else
ifeq ($(findstring il,$(GRADE)),il)
ifeq ($(findstring il,$(GRADE)),il)
.PHONY: install_headers
.PHONY: install_headers
install_headers: $(MCPP_HDRS) install_dirs
cp `vpath_find $(MCPP_HDRS)` $(INSTALL_INC_DIR)
.PHONY: install_init
install_init:
install_init:
.PHONY: install_lib
.PHONY: install_lib
install_lib: $(DOTNET_DLLS) install_headers install_dirs
cp `vpath_find $(DOTNET_DLLS)` $(INSTALL_MERC_LIB_DIR)
@@ -427,7 +428,7 @@ install_lib: $(DOTNET_DLLS) install_headers install_dirs
else
# mercury_conf.h needs to be in a separate directory so it can be
# mercury_conf.h needs to be in a separate directory so it can be
# overridden by a different configuration.
.PHONY: install_headers
install_headers: $(HDRS) $(BODY_HDRS) $(MACHHDRS) \

View File

@@ -1,7 +1,7 @@
#! /bin/sh
# @configure_input@
#---------------------------------------------------------------------------#
# Copyright (C) 1995-2004 The University of Melbourne.
# Copyright (C) 1995-2005 The University of Melbourne.
# This file may only be copied under the terms of the GNU General
# Public License - see the file COPYING in the Mercury distribution.
#---------------------------------------------------------------------------#
@@ -333,11 +333,11 @@ esac
use_msvcrt=@USE_MSVCRT@
if test $use_msvcrt = "yes"; then
case $thread_safe in
# /MD states that we will use the MSVC runtime,
# the boehm_gc collector assumes that the collector
# has been built as a DLL if we are using the MSVC runtime
# so we need to define GC_NOT_DLL when the collector isn't
# built as a DLL.
# /MD states that we will use the MSVC runtime,
# the boehm_gc collector assumes that the collector
# has been built as a DLL if we are using the MSVC runtime
# so we need to define GC_NOT_DLL when the collector isn't
# built as a DLL.
true) MSVCRT_OPTS="/MD" ;;
false) MSVCRT_OPTS="/DGC_NOT_DLL /MD" ;;
esac
@@ -589,16 +589,24 @@ case $assemble in true)
exec $AS $AS_OPTS "$@" ;;
esac
if test -r .mgnuc_opts
then
INVISIBLE_OPTS=`cat .mgnuc_opts`
else
INVISIBLE_OPTS=""
fi
ALL_CC_OPTS="$MERC_ALL_C_INCL_DIRS $ANSI_OPTS $CHECK_OPTS $OPT_OPTS \
$HLC_OPTS $HLD_OPTS $GCC_OPTS $MSVCRT_OPTS $GC_OPTS $DEFINE_OPTS \
$STACK_TRACE_OPTS $TRACE_OPTS $DECL_DEBUG_OPTS \
$LLDEBUG_OPTS $C_DEBUG_OPTS \
$PROF_TIME_OPTS $PROF_CALLS_OPTS $PROF_MEMORY_OPTS \
$PROF_DEEP_OPTS $INLINE_ALLOC_OPTS $TRAIL_OPTS \
$RECORD_TERM_SIZE_OPTS \
$RESERVE_TAG_OPTS $MINIMAL_MODEL_OPTS \
$SPLIT_OPTS $THREAD_OPTS $PICREG_OPTS $ARCH_OPTS $ARG_OPTS"
$HLC_OPTS $HLD_OPTS $GCC_OPTS $MSVCRT_OPTS \
$GC_OPTS $DEFINE_OPTS \
$STACK_TRACE_OPTS $TRACE_OPTS $DECL_DEBUG_OPTS \
$LLDEBUG_OPTS $C_DEBUG_OPTS \
$PROF_TIME_OPTS $PROF_CALLS_OPTS $PROF_MEMORY_OPTS \
$PROF_DEEP_OPTS $INLINE_ALLOC_OPTS $TRAIL_OPTS \
$RECORD_TERM_SIZE_OPTS \
$RESERVE_TAG_OPTS $MINIMAL_MODEL_OPTS \
$SPLIT_OPTS $THREAD_OPTS $PICREG_OPTS $ARCH_OPTS $ARG_OPTS \
$INVISIBLE_OPTS"
case $verbose in true)
echo $CC $ALL_CC_OPTS "$@" $OVERRIDE_OPTS $ALL_LOCAL_C_INCL_DIRS;;

View File

@@ -37,15 +37,18 @@ cp trace/*.[ch] tmp_dir/trace
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

View File

@@ -1 +1,2 @@
Mercury.options
SLICE_FLAGS.in

View File

@@ -25,18 +25,18 @@ CHECKS = $(patsubst %,%.check,$(MERCURY_MAIN_MODULES))
VPATH = $(MDBCOMP_DIR) $(LIBRARY_DIR)
MCFLAGS += -I $(MDBCOMP_DIR)
#-----------------------------------------------------------------------------#
MLFLAGS += --shared
MCFLAGS += --linkage shared
MCFLAGS += --flags SLICE_FLAGS $(CONFIG_OVERRIDE)
#-----------------------------------------------------------------------------#
.PHONY: depend
depend: $(DEPENDS)
$(DEPENDS): SLICE_FLAGS
.PHONY: all
all: $(MERCURY_MAIN_MODULES) $(TAGS_FILE_EXISTS)
@@ -97,7 +97,7 @@ ils: $(mslice.ils) $(mdice.ils)
#-----------------------------------------------------------------------------#
realclean_local:
rm -f tags
rm -f tags SLICE_FLAGS SLICE_FLAGS.date
#-----------------------------------------------------------------------------#

20
slice/SLICE_FLAGS.in Normal file
View File

@@ -0,0 +1,20 @@
@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

View File

@@ -34,7 +34,9 @@ endif
# 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.
@@ -70,6 +72,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: ;

1
tests/TESTS_FLAGS.in Normal file
View File

@@ -0,0 +1 @@
@BOOTSTRAP_MC_ARGS@

16
tests/WS_FLAGS.ws Normal file
View File

@@ -0,0 +1,16 @@
--no-mercury-stdlib-dir
-I@WORKSPACE@/library
-I@WORKSPACE@/browser
-I@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

View File

@@ -49,6 +49,7 @@ MCFLAGS-imported_mode = --infer-all --no-intermodule-optimization \
--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-no_exports = --halt-at-warn
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 \

View File

@@ -1,4 +1,5 @@
Mercury/ints/exported_mode.int:003: Error: mode declaration for predicate `exported_mode.p/2'
Mercury/ints/exported_mode.int:003: Error: mode declaration for predicate
Mercury/ints/exported_mode.int:003: `exported_mode.p/2'
Mercury/ints/exported_mode.int:003: without preceding `pred' declaration.
Mercury/ints/exported_mode.int:003: Inferred :- pred p(T1, T2).
For more information, try recompiling with `-E'.

View File

@@ -1,11 +1,17 @@
missing_interface_import.m:007: In definition of type `missing_interface_import.bar'/0:
missing_interface_import.m:007: error: undefined type `map'/2
missing_interface_import.m:007: (the module `map' has not been imported in the interface).
missing_interface_import.m:009: In definition of predicate `missing_interface_import.p'/1:
missing_interface_import.m:009: error: undefined type `std_util.univ'/0
missing_interface_import.m:009: (the module `std_util' has not been imported in the interface).
missing_interface_import.m:010: In definition of predicate `missing_interface_import.q'/1:
missing_interface_import.m:010: error: undefined type `list'/1
missing_interface_import.m:010: (the module `list' has not been imported in the interface).
missing_interface_import.m:007: In definition of type
missing_interface_import.m:007: `missing_interface_import.bar'/0:
missing_interface_import.m:007: error: undefined type `map'/2.
missing_interface_import.m:007: (The module `map' has not been imported in
missing_interface_import.m:007: the interface.)
missing_interface_import.m:009: In definition of predicate
missing_interface_import.m:009: `missing_interface_import.p'/1:
missing_interface_import.m:009: error: undefined type `std_util.univ'/0.
missing_interface_import.m:009: (The module `std_util' has not been imported
missing_interface_import.m:009: in the interface.)
missing_interface_import.m:010: In definition of predicate
missing_interface_import.m:010: `missing_interface_import.q'/1:
missing_interface_import.m:010: error: undefined type `list'/1.
missing_interface_import.m:010: (The module `list' has not been imported in
missing_interface_import.m:010: the interface.)
`Mercury/ints/missing_interface_import.int' not written.
For more information, try recompiling with `-E'.

View File

@@ -48,6 +48,8 @@ include Mercury.options
# `.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 ;

File diff suppressed because it is too large Load Diff