Commit Graph

49 Commits

Author SHA1 Message Date
Julien Fischer
06d83c7ca9 Rename NEWS -> NEWS.md.
NEWS:
    As above.

README.md:
RELEASE_NOTES:
bindist/Mmakefile:
compiler/notes/coding_standards.html:
compiler/notes/developer_intro.html:
    Conform to the above change.
2023-01-23 13:09:02 +11:00
Julien Fischer
093018109c Update references to LIMITATIONS file.
BUGS:
README.md:
bindist/Mmakefile:
compiler/notes/release_checklist.html:
compiler/prog_data.m:
doc/reference_manual.texi:
library/list.m:
runtime/mercury_type_desc.h:
    As above.
2022-01-01 15:53:34 +11:00
Zoltan Somogyi
b8b845a568 Fix mmakefile rules for os,cs,css,javas.
The main objective of this change is to get bootchecks in the csharp
and java grades to actually build the slice, profiler, deep_profiler
and mfilterjavac directories, which (due to the bug this diff fixes)
they weren't doing before.

However, since one side effect of this change is to eliminate
one source of annoying warnings from mmake about references to undefined
variables, a subsidiary objective is to eliminate other sources of such
warnings as well, which mostly come from the rules for making tags files.

browser/Mmakefile:
deep_profiler/Mmakefile:
library/Mmakefile:
mdbcomp/Mmakefile:
profiler/Mmakefile:
slice/Mmakefile:
ssdb/Mmakefile:
    When creating stage 3, the bootcheck builds, in each directory,
    only the files that it wants to compare against their stage 2 versions.
    This means that it wants to build all the .c, .cs or .java files,
    which it does via the cs, css and javas mmake targets.

    The correct definitions of the rules of these targets depends on
    whether mmc --make is being used or not, so we need at least two
    sets of definitions: one for mmc --make, and for no mmc --make,
    and conditionally selecting the appropriate one. The latter definition
    has the problem that it refers to mmake variables that are intended
    to be defined in .dv files created by mmc --generate-dependencies,
    but until that has been run, those mmake variables are undefined.

    Until now, the only directories that had both the mmc --make
    and the no mmc --make definitions were the ones needed to build
    the compiler. Bootchecks in the csharp and java grades, which
    always use --make make, got errors when they tried to build
    the directories that bootcheck builds after the compiler:
    the slice, profiler, deep_prof and mfilterjavac directories.

    This diff ensures that all directories we build in bootcheck
    get all both versions of the os, cs, css, and javas targets.
    In fact, they get two subversions of the no mmc --make version:
    one for use in the presence of .dv files, and one for use in their
    absence. The latter just builds the .dv files and invokes mmake
    again. This avoids one source of warnings about undefined mmake
    variables.

    To avoid another source, make the rules for tags files and their
    proxies depends on *.m instead of mmake variables such as $(mcov.ms),
    since this makes sense even before making dependencies. The only price
    is that any untracked Mercury source files in the directory have to
    either be given some other suffix, or moved somewhere else.

    Where relevant, make the mtags invocation prefer the master versions
    of files that are copied from the mdbcomp directory to other directories,
    since this is the only writeable version.

    Make the os and cs rules consistently NOT build the _init.[co] files.
    The way we use those files in bootcheck, we never need them;
    when we need them, the right target to give is the executable anyway.

    In the slice directory, don't put mcov between mtc_union and mtc_diff.

    Eliminate unnecessary duplication, e.g. of sources in rules.

    Eliminate double negatives in conditionals.

    Fix formatting.

Mmake.common.in:
bindist/Mmakefile:
bytecode/Mmakefile:
compiler/Mmakefile:
doc/Mmakefile:
grade_lib/Mmakefile:
robdd/Mmakefile:
samples/Mmakefile:
scripts/Mmakefile:
tools/Mmakefile:
trace/Mmakefile:
util/Mmakefile:
    Add "ft=make" to vim modelines. This is redundant for the files whose
    names is Mmakefile, but it is needed for Mmake.common.
2020-04-11 20:10:38 +10:00
Peter Wang
41821e0b88 Move licensing information to separate file.
LICENSE:
    Move licensing information into this new file.

.README.in:
bindist/bindist.README:
    Reference the new file.

bindist/Mmakefile:
    Include LICENSE into binary distributions.
2017-08-16 10:39:14 +10:00
Zoltan Somogyi
d33273d033 Tell vim not to expand tabs in Makefiles.
This file-specific setting will override a default setting of expandtabs
in $HOME/.vimrc.

*/Makefile:
*/Mmakefile:
    As above.

tests/hard_coded/.gitignore:
    Don't ignore the purity subdir. This ignore must have been left over
    from when purity.m was a test in hard_coded, not hard_coded/purity,
    and it ignored an executable, not a directory.
2015-01-08 22:07:29 +11:00
Peter Wang
6ad6d12260 Filter out warning message from gcc 4.x which are emitted when compiling
Branches: main, 10.04

Filter out warning message from gcc 4.x which are emitted when compiling
low-level C code using assembler labels, at least until a better fix is
available.

util/Mmakefile:
util/mfiltercc.c:
        Add a new program, mfiltercc.

compiler/options.m:
        Add `--filtercc-command' option (undocumented).

compiler/compile_target_code.m:
        Filter compiler output with mfiltercc if using assembler labels.

scripts/mgnuc.in:
        Filter compiler output with mfiltercc if using assembler labels, but
        only if mfiltercc can be found on the $PATH.  The bootstrap compiler
        may not have mfiltercc.

.mercury-compiler.spec.in:
Makefile:
README.MinGW:
bindist/Mmakefile:
bindist/bindist.Makefile.in:
scripts/mercury_config.in:
        Mention mfiltercc in various places.
2010-07-09 07:10:16 +00:00
Julien Fischer
fc0a8f4e1f Delete some old Aditi related stuff.
bindist/Mmakefile:
	Delete some old Aditi related stuff.
2008-11-18 06:35:27 +00:00
Julien Fischer
d6e27b7dd5 Delete references to the mercury_cleanup_install script.
Estimated hours taken: 0.1
Branches: main

bindist/Mmakefile:
bindist/bindist.Makefile.in:
	Delete references to the mercury_cleanup_install script.
	It was deleted earlier this year.
2008-08-13 15:08:54 +00:00
Julien Fischer
78abd839bc Fix the scripts that build and install the binary packages for Linux.
Estimated hours taken: 1
Branches: main, release

Fix the scripts that build and install the binary packages for Linux.  These
have been broken since the change that moved the executables, mercury_compile,
mercury_profile etc, into $(INSTALL_PREFIX)/bin.

bindist/Mmakefile:
	Tar up the bin directory of the installation we are building
	the binary package from since it now contains the executables.

	Conform to the current structure of the library installation
	hierarchy.

bindist/bindist.Mmakefile.in:
	Conform to the above changes when installing.
2006-04-26 05:43:41 +00:00
Ian MacLarty
2e04ddc748 Remove the architecture string from the installed directory structure
Estimated hours taken: 1
Branches: main and 0.12

Remove the architecture string from the installed directory structure
and put the executables in $PREFIX/bin, instead of
$PREFIX/lib/mercury/bin/$FULLARCH.

The reason for this change is to reduce the need for unix shell scripts in
the top-level bin directory that call the actual programs in the
lib/mercury/bin/FULLARCH directory.  The unix scripts can't be run on Windows
without a unix emulation environment like Cygwin.

Because the executables are now in the top-level bin directory, we cannot
install multiple architectures under the same directory structure.  However
this is not a real loss, since the binaries for different architectures can
just be installed to different locations, as we currently do anyway on
mundula.cs.mu.oz.au.

The plan is to rename mercury_compile to mmc and do away with the mmc unix
script.  This will allow mmc to be run on Windows without Cygwin or MSYS.
This proposal replaces a previous proposal to implement a C version of the
mmc script.  That solution turned out to be quite complicated and
unreliable.

This diff will also mean mdice, mslice and mtc_union will be in the same
directory as mmc, so will be in the PATH as long as mmc is in the PATH.

configure.in:
bindist/Mmakefile:
bindist/bindist.Makefile.in:
compiler/compile_target_code.m:
compiler/handle_options.m:
compiler/make.program_target.m:
debian/rules:
library/Mmakefile:
scripts/Mmake.vars.in:
scripts/mdprof.in:
scripts/mercury.bat.in:
scripts/mgnuc.in:
scripts/ml.in:
scripts/mmc.in:
scripts/mprof.in:
tools/run_all_tests_from_cron:
tools/test_mercury:
	Remove FULLARCH from the installed directory structure.
	Install executables to the top-level bin directory.
2005-10-25 10:17:29 +00:00
Simon Taylor
ceaa856013 Move the setting of configuration options from mmc.in to
Estimated hours taken: 20
Branches: main

Move the setting of configuration options from mmc.in to
an options file Mercury.config. This has a few advantages:
- reduces the duplication between mmc and mercury.bat
- reduces the chance of running out of environment space
  on crappy operating systems (although we probably exceed
  the command line length limits on those systems anyway).
- makes it easier to bootstrap changes which add new
  configuration options.

Always read the options files, even without `--make',
to avoid inconsistent behaviour.

scripts/Mercury.config.in:
	New file containing the configuration code from mmc.in.

configure.in:
	Create scripts/Mercury.config.

bindist/Mmakefile:
	Make sure Mercury.config.in goes in the binary distribution.

Mmakefile:
bindist/Mmakefile:
Mmake.common.in:
	Make sure we get the correct setting of INSTALL_PREFIX
	when building the binary distribution.

scripts/Mmakefile:
scripts/mercury_config.in:
bindist/bindist.Mmakefile.in:
	Install Mercury.config.

compiler/options.m:
doc/user_guide.texi:
	Add documentation for the `--config-file' option, which gives
	the name of the configuration file to read.

	Add an option `read-config-file-2003-03-01' which will be
	used in configure.in to test whether the compiler is up
	to date after the configuration code is removed from mmc.in
	(after this change is installed everywhere).

	Add `--mercury-config-dir' as an abbreviation for
	`--mercury-configuration-directory'.

Mmake.workspace:
	Use the configuration file in scripts/Mercury.config.

browser/Mmakefile:
compiler/Mmakefile:
scripts/Mmake.vars.in:
	Always pass ALL_MCFLAGS to mmc so that mmc will
	use the configuration file specified in the options.

compiler/handle_options.m:
	Handle the default value of `--config-file'.

compiler/mercury_compile.m:
	Read the configuration file.

	Always read the options files, even without `--make',
	to avoid inconsistent behaviour.

compiler/make.m:
	Pass the variable settings from the configuration file
	to make__process_args.

	The options files have already been read in mercury_compile.m,
	so don't read them again here.

compiler/make.util.m:
	Add a version of build_with_module_options which doesn't
	need a make_info, for use by mercury_compile.m.

compiler/options_file.m:
	Export a predicate to read a single options file.

	Make the predicates to read options files add to an initial
	options_variables map, rather than always creating a new one.

	Allow MERCURY_STDLIB_DIR and MERCURY_CONFIG_DIR
	to be set in the options file or environment.

scripts/mmc.in:
	Set MERCURY_STDLIB_DIR and MERCURY_CONFIG_DIR in
	mercury_compile's environment.
2003-03-01 06:35:17 +00:00
Simon Taylor
7597ca1e80 Allow reconfiguration of existing installations, for example
Estimated hours taken: 20
Branches: main

Allow reconfiguration of existing installations, for example
to use a different C compiler. The reconfiguration works
by making a new copy of the scripts and mercury_conf.h,
and storing them in a partial installation directory tree
which uses the libraries and executables from the existing
installation.

Use this method to configure binary distributions, rather
than using a cut down version of the configuration script,
to avoid code duplication and to handle the case where the
C compiler in use on the installation machine is different
than that used to build the binary distribution.

This is more robust than the previous method of using a different
C compiler, which was to set the MERCURY_C_COMPILER variable and
hope the different C compilers were compatible enough.

Mmakefile:
runtime/Mmakefile:
scripts/Mmakefile:
	Modify the `install' targets to store files needed to create
	a new configuration in $INSTALL_LIBDIR/reconf.

runtime/Mmakefile:
	Install mercury_conf.h in $INSTALL_LIBDIR/conf, rather than
	$INSTALL_LIBDIR/inc, so that it can be overridden by a
	different configuration.

scripts/mercury_config.in:
	Create a new configuration, by creating part of a Mercury
	source tree from the files stored in $INSTALL_LIBDIR/reconf,
	running configure, then copying the files into a partial
	installation tree.

scripts/Mmake.vars.in:
	Define ENABLE_DEEP_PROFILER, for use by bindist/bindist.Makefile.

	Define variables INSTALL_CONF_DIR (contains the files describing
	the configuration) and INSTALL_RECONF_DIR (contains files needed
	to reconfigure an installation).

configure.in:
	Add an option `--enable-reconfigure', for use by
	mercury_config.in.

	Don't look for runtime/mercury_wrapper.c when checking
	for the sources -- it isn't present when reconfiguring.
	Look for scripts/mmc.in instead.

	Look for the runtime headers in the installation hierarchy
	rather than the `runtime/' and `trace/' directories when
	reconfiguring.

	Output the help message for the `configure' script to
	`configure.help'.  This is included in the help message
	for `mercury_config'.

	Add new configuration variables CONFIG_PREFIX and CONFIG_LIBDIR,
	which are like PREFIX and LIBDIR except that they point
	to the configuration files, not the library files.
	In the normal case PREFIX and CONFIG_PREFIX will be the same.

bindist/bindist.INSTALL.in:
bindist/bindist.Makefile.in:
	Use mercury_config to configure binary distributions.

bindist/Mmakefile:
bindist/bindist.configure.in:
bindist/bindist.build_vars.in:
	Remove bindist.configure.in and bindist.build_vars.in.

compiler/options.m:
scripts/parse_ml_options.sh-subr.in:
scripts/mgnuc.in:
doc/user_guide.texi:
	Add an option `--mercury-config-dir', and an environment
	variable MERCURY_CONFIG_DIR, which tell the compiler and
	scripts where to find the configuration files for the
	installation.
	MERCURY_CONFIG_DIR is not documented because it should
	only be used by the scripts.

compiler/compile_target_code.m:
	Pass `--mercury-config-dir' to the scripts.

compiler/handle_options.m:
	Add `--c-include-directory $MERCURY_CONFIG_DIR/conf'.

library/getopt.m:
	Handle `maybe_string_special' options.

doc/user_guide.texi:
	Update the "Using a different C compiler" chapter.

NEWS:
	Document the changes.
2003-01-24 07:17:13 +00:00
Fergus Henderson
07435e83d5 Fix a bug: don't try to include mdprof_cgi in the binary
Estimated hours taken: 0.25
Branches: main, release

bindist/Mmakefile:
	Fix a bug: don't try to include mdprof_cgi in the binary
	distribution if the deep profiler was not enabled.
2002-12-03 08:51:26 +00:00
Fergus Henderson
bd8a19d7a2 Fix a bug where building the binary distribution failed when deep
Estimated hours taken: 0.5
Branches: main, release

Fix a bug where building the binary distribution failed when deep
profiling was enabled, due to the mdprof_cgi program not having
been built.

deep_profiler/Mmakefile:
	Install mdprof_cgi in <prefix>/lib/mercury/<fullarch>/bin,
	as well as in /var/lib/cgi-bin.

bindist/Mmakefile:
	Use the installed mdprof_cgi from <prefix>/lib/mercury/<fullarch>/bin,
	rather than the version in the build directory (../deep_profiler),
	since the latter may not be around when the binary distribution
	is being created.
2002-12-02 11:51:34 +00:00
Fergus Henderson
e86057942c Apply Zoltan's deep profiler changes to the main branch.
Estimated hours taken: 2
Branches: main

Apply Zoltan's deep profiler changes to the main branch.  Zoltan committed
these changes to the release branch, but forgot to commit them to the main
branch.

Mmakefile:
NEWS:
configure.in:
bindist/Mmakefile:
bindist/bindist.Makefile.in:
doc/user_guide.texi:
library/exception.m:
library/io.m:
runtime/mercury_conf.h.in:
runtime/mercury_conf_param.h:
runtime/mercury_misc.c:
runtime/mercury_misc.h:
scripts/Mmakefile:
deep_profiler/.nocopyright:
deep_profiler/Mercury.options:
deep_profiler/Mmakefile:
deep_profiler/callgraph.m:
deep_profiler/cliques.m:
deep_profiler/conf.m:
deep_profiler/html_format.m:
deep_profiler/interface.m:
deep_profiler/mdprof_cgi.m:
deep_profiler/query.m:
deep_profiler/startup.m:
deep_profiler/timeout.m:
deep_profiler/mdprof_server.m:
deep_profiler/server.m:
	Merge in changes from the release branch.
	Enclosed below is Zoltan's original log message.

----------

Estimated hours taken: 0.3 (on release branch)
Branches: release

Make the deep profiler work again.

The existing process structure of the deep profiler made it very hard to debug,
mainly because the Mercury debugger is confused by forks and stymied by execs.
This change completely replaces the process structure. The old structure had
two separate programs, mdprof_cgi and mdprof_server, the first always acting
as client and the second always acting as server. The new structure has only
one program, mdprof_cgi, which acts as a server if there is no existing server
for the relevant profiling data file, and as a client otherwise.

Although mdprof_cgi normally forks when it becomes a server to let the parent
exit and let the web server know that the web page it has generated is
complete, the fork can be disabled for debugging via an option. This allows
the communication between client and server to be debugged by running two
instances of mdprof_cgi in different windows, one or both under mdb.

deep_profiler/DESIGN:
	New file describing the new process structure, its race conditions,
	and their solutions.

deep_profiler/.nocopyright:
	Add DESIGN.

deep_profiler/mdprof_cgi.m:
	A complete rewrite of this module to enable it act as both client and
	server.

deep_profiler/mdprof_test.m:
	A new module to hold the testing functionality of mdprof_server.m.

deep_profiler/mdprof_server.m:
deep_profiler/server.m:
	Delete these now unnecessary modules.

Mmakefile:
	Replace references to mdprof_server with references to mdprof_test.

deep_profiler/Mmakefile:
	Replace references to mdprof_server with references to mdprof_test.

	Move the include of Mmake.deep.params, to allow it to override
	top level parameter settings.

deep_profiler/Mercury.options:
	Work around a compiler bug by turning off the offending optimization.

deep_profiler/timeout.m:
	A rewrite of major parts of this module to support the new design
	of mdprof_cgi.m, and to make unexpected signals easier to debug.

deep_profiler/interface.m:
	Implement the mechanisms needed by the new process structure.

	Change the characters we use to separate components of the URL.
	The old ones were special to the shell, and screwed up command lines.
	(As double insurance, we ignore the command line anyway when invoked
	by the web server.)

	Change some names to be more expressive.

deep_profiler/conf.m:
	Add a new function, getpid, for use by interface.m.

	Rewrite some code to use streams explicitly, not implicitly.

deep_profiler/callgraph.m:
deep_profiler/cliques.m:
	Add (now commented out) code to help debug these modules, for use
	in cases where mdb doesn't help, because the program works perfectly
	with debugging enabled :-(

deep_profiler/query.m:
	Move the predicate try_exec here from the deleted file server.m.

deep_profiler/html_format.m:
	Trivial change to conform to name change in interface.m.

deep_profiler/startup.m:
	Generate debugging output to a caller specified stream, not to
	stdout and stderr.

	Disable the generation of statistics temporarily, since the diff
	to make statistics reporting routines write to a specified stream
	instead of stdout and stderr won't be committed on the release branch.
	Currently, they always write to stdout, which in the new design
	goes to the web page, not to the startup file.

configure.in:
	Detect the presence of opendir, readdir and closedir, and the header
	file they need, dirent.h. Enable the deep profiler only if all exist,
	since the deep profiler now needs them.

runtime/mercury_conf.h.in:
	Support the changes to configure.in.

runtime/mercury_misc.[ch]:
	Add a mechanism for registering cleanup functions to be executed when
	we terminate the program due to an uncaught exception.

library/exception.m:
	Invoke the registered cleanup functions just before terminating
	the program due to an uncaught exception.
2002-12-02 11:25:47 +00:00
Ralph Becket
b4bdced2e9 Minor corrections to the bindist build.
Estimated hours taken: 3
Branches: main

Minor corrections to the bindist build.

bindist/Mmakefile:
	Revised a comment concerning the Aditi release.
	Ensure that the configure file is executable.

bindist/bindist.configure.in:
	Fixed a typo that was causing problems with the
	binary installation.
2002-11-04 06:30:39 +00:00
Simon Taylor
1ea35a2a3a Build WORK_IN_PROGRESS and TODO before building the
Estimated hours taken: 0.1
Branches: main

Mmakefile:
	Build WORK_IN_PROGRESS and TODO before building the
	binary distribution.

bindist/Mmakefile:
	Add TODO to the binary distribution.
2002-11-01 07:10:16 +00:00
Fergus Henderson
50edc423b9 Avoid hard-coding the list of README.* files
Branches: main
Estimated hours taken: 0.25

bindist/Mmakefile:
	Avoid hard-coding the list of README.* files
	(which was out-of-date).
2002-10-16 06:03:15 +00:00
Ralph Becket
ab949ba065 Files and instructions for adding Mercury syntax highlighting under Vim 6.0.
Etimated hours taken: 8
Branches: main

Files and instructions for adding Mercury syntax highlighting under Vim 6.0.

NEWS:
      Mention the new directory.

vim:
vim/after:
vim/after/filetype.vim:
vim/ftplugin:
vim/ftplugin/mercury.vim:
vim/ftplugin/mercuryhdr.vim:
vim/syntax:
vim/syntax/mercury.vim:
vim/README:
      New directory structure added and populated.

bindist/Mmakefile:
      Added VIM_FILES variable and commands to create
      $(MERCURY_VERSION)/vim if necessary and populate it.
2002-04-08 03:07:34 +00:00
Fergus Henderson
f0192a615e Fix a bug that caused a confusing error message when trying to build a
Estimated hours taken: 0.25
Branches: main

bindist/Mmakefile:
	Fix a bug that caused a confusing error message when trying to build a
	binary distribution without having unpacked the `extras' directory:
	use `cd foo && ...' rather than `cd foo; ...'.
2001-05-09 17:32:45 +00:00
Fergus Henderson
787f3c2707 Include README.DotNet in the binary distribution.
Estimated hours taken: 0.1
Branches: main, release

bindist/Mmakefile:
	Include README.DotNet in the binary distribution.
2001-03-23 20:14:38 +00:00
Zoltan Somogyi
7e0a04f17c Add options to configure that allow the user to specify the set of library
Estimated hours taken: 8

Add options to configure that allow the user to specify the set of library
grades to be installed more precisely.

configure.in:
	Add an option --enable-libgrade=<gradelist> that specifies
	the list of library grades precisely.

	Add an option, --disable-most-grades, that reduces the installed
	grades to a "minimum" level for developers (asm_fast.gc,
	asm_fast.gc.debug.tr and hlc.gc), since this is useful to minimize
	installation time e.g. when installing a release of the day on a
	laptop.

	Add an option, --disable-nogc-grades, that prevents the installation
	of grades without garbage collection.

	Add an option, --disable-prof-grades, that prevents the installation
	of profiling grades.

	Add an option, --disable-trail-grades, that prevents the installation
	of trailing grades.

	Add an option, --disable-pair-grades, that prevents the installation
	of thread-safe grades.

.INSTALL.in:
	Mention the new configure options, as well as some previously
	undocumented old ones.

scripts/canonical_grade.in:
	A new script to be used by configure.in. Its jobs is to print the
	canonical version of a grade string.

scripts/canonical_grade.sh-subr:
	A new sh subroutine, containing code previously from ml.in that is
	now also needed by canonical_grade.in.

scripts/ml.in:
	Move code from here to canonical_grade.sh-subr.

Mmakefile:
	Include scripts/canonical_grade in tar files, since configure.in
	needs it.

bindist/Mmakefile:
	Include scripts/canonical_grade in binary distributions, since
	configure.in needs it.
2000-12-18 07:17:44 +00:00
Tyson Dowd
10cb720557 Remove bindist.README.Linux and bindist.README.MS-Windows.
Estimated hours taken: 1

bindist/Mmakefile:
bindist/bindist.README.Linux:
bindist/bindist.README.MS-Windows:
	Remove bindist.README.Linux and bindist.README.MS-Windows.
	These were causing double maintenance problems.
	All they did was substitute the VERSION into the appropriate
	places in the document, which isn't very important for these
	documents.

bindist/bindist.build_vars.in:
bindist/bindist.configure.in:
	Add the new configuration variables that Peter Ross has been
	adding recently.  If these are not propogated into the
	build_vars for the bindist, the scripts in the bindist won't
	work properly (for instance, they won't know the correct suffix
	for executables when linking).
2000-09-06 05:30:10 +00:00
Tyson Dowd
64ef7e602b Put the samples, extras and tests in .tar.gz files.
Estimated hours taken: 0.5

bindist/Mmakefile:
	Put the samples, extras and tests in .tar.gz files.
	This means that installation requires less disk space, as they
	are not expanded unless someone is actually interested in them.
2000-09-05 03:23:42 +00:00
Fergus Henderson
cc3dab98d9 Fix various problems, mostly minor, with the README* files.
Estimated hours taken: 0.75

Fix various problems, mostly minor, with the README* files.
The most significant of these was that the ftp sites listed
in the README file in the binary distribution were out-of-date.

README.Linux:
	Fix a typo.

.README.in:
	Mention some new README.* files.
	Update the version number and copyright dates for the Boehm GC.

bindist/bindist.README:
	Update the version number and copyright dates for the Boehm GC.
	Update the ftp sites.  Update the copyright date.
	Update the file names for the Mercury standard library and
	runtime library.

bindist/Mmakefile:
	Include the files README.OSF1, README.Linux-Alpha, README.Linux-PPC,
	and README.Solaris in the binary distribution.

bindist/bindist.README.Linux:
	Update to match the changes to README.Linux in the source distribution.

profiler/mercury_profile.m:
	Update the copyright date printed by `mprof --help'.
1999-12-19 15:54:29 +00:00
Fergus Henderson
026a0966d8 Add a rule for the `clean_local' target which removes
Estimated hours taken: 0.1

bindist/Mmakefile:
	Add a rule for the `clean_local' target which removes
	mercury-rotd* and mercury-DEV*.  These are needed to
	clean up properly in case the building of the tar file
	fails part-way.
1999-11-28 07:44:02 +00:00
Warwick Harvey
be51ca48b6 Added built-in mmake support for installing user libraries.
Estimated hours taken: 30

Added built-in mmake support for installing user libraries.

Mmake.common.in:
	Moved the definitions of many of the generic install directories
	(plus FULLARCH and LIBGRADES) to scripts/Mmake.vars.in, so they
	can be used for things other than just the Mercury compiler.

compiler/modules.m:
	Added code to generate appropriate lib<module>.install* targets.
	Improved the dependency list generated for the lib<module> target to
	include intermodule optimisation files if and only if the
	appropriate flags have been set (previously it always depended on
	the `.opt' files, but never on the `.trans_opt' files).

scripts/Mmake.rules:
	Added some rules for use when installing libraries.

scripts/Mmake.vars.in:
	Added the definitions of many of the generic install directories
	(plus FULLARCH and LIBGRADES) from Mmake.common.in.
	Added support for overriding and/or adding to the definition of
	LIBGRADES on a per-library basis.

scripts/mercury_cleanup_install:
	New script, for cleaning up after failed installs.

scripts/Mmakefile:
	Added `mercury_cleanup_install' to the list of scripts to be
	installed.

bindist/Mmakefile:
bindist/bindist.Makefile.in:
	Added `mercury_cleanup_install' and `vpath_find' to the list of
	utilities included in and installed by a binary distribution.  These
	are used by some of the install targets.

doc/user_guide.texi:
	Documented the new features.

extras/references/Mmakefile:
extras/references/samples/Mmakefile:
	Changed to exploit/test new features.
1999-10-21 14:36:39 +00:00
Fergus Henderson
98b0afa001 Use clean_local' instead of clean' and `realclean_local' instead
Estimated hours taken: 0.75

Mmakefile:
*/Mmakefile:
*/*/Mmakefile:
*/*/*/Mmakefile:
	Use `clean_local' instead of `clean' and `realclean_local' instead
	of `realclean' where appropriate.  This is necessary now that
	`realclean' does not depend on `clean'.
1999-09-16 04:46:31 +00:00
Tyson Dowd
1ea07b240b Improve the install and bindist creation on win32.
Estimated hours taken: 1

Improve the install and bindist creation on win32.

bindist/Mmakefile:
	Use EXT_FOR_EXE when installing executables.

bindist/README.MS-Windows:
	Remove unnecessary file, we now handle these instructions
	automatically.

scripts/Mmakefile:
	Move and replace mmake instead of deleting it while running.


Estimated hours taken: _____

<overview or general description of changes>

<directory>/<file>:
	<detailed description of changes>
1999-07-29 04:26:54 +00:00
Fergus Henderson
5e41fcdd66 Fix a small error in the invocation of autoconf in my previous change:
Estimated hours taken: 0.05

bindist/Mmakefile:
	Fix a small error in the invocation of autoconf in my previous change:
	a space is needed between the `-l' option and the directory name.
1999-03-31 08:07:24 +00:00
Fergus Henderson
1757f89df3 Add GNU readline support to the debugger.
Estimated hours taken: 16

Add GNU readline support to the debugger.

Because GNU readline is licensed under the GPL, not the LGPL,
I was careful to ensure that (1) the readline library is
only linked into your application if it is compiled with
debugging enabled and (2) even in the latter case, the readline
support is disable-able (if you use the source distribution).

Mmakefile:
bindist/Mmakefile:
	Add dependency of configure on new file aclocal.m4.

aclocal.m4:
	Define a macro MERCURY_CHECK_READLINE to check for the readline
	headers, the readline library, and for libraries needed by readline,
	in particular -l{termcap,curses,ncurses}.
	If they're not found, define MR_NO_USE_READLINE.
	Otherwise, define various variables for using & installing readline.

bindist/bindist.configure.in:
configure.in:
	Add call to MERCURY_CHECK_READLINE to check for readline.

scripts/ml.in:
	If tracing is enabled, then (by default) link in readline,
	and hence also termcap/curses/ncurses.
	Add a new option `--no-readline' to disable this.

trace/mercury_trace_internal.c:
	Delete the FILE * parameter from the MR_getline() function,
	because there are actually two files involved (MR_mdb_in and
	MR_mdb_out), and they are always the same for all calls to this
	function.
	Also change this function so that it calls MR_trace_readline() rather
	than printing the prompt and then calling MR_trace_getline_raw().
	Delete the MR_trace_getline_raw() function -- this has been renamed
	as MR_trace_readline_raw() and moved to mercury_trace_readline.c.

trace/mercury_trace_readline.h:
trace/mercury_trace_readline.c:
	New module containing a new function MR_trace_readline() that prints
	a prompt and reads a line in by calling the readline library.
	I put all this new code inside `#ifndef MR_NO_USE_READLINE' so that
	the use of readline can be disabled.  If that symbol is defined,
	it reverts to the old implementation using MR_trace_readline_raw()
	(formerly called MR_trace_getline_raw()).

runtime/mercury_conf.h.in:
	Define the new configuration parameter `MR_NO_USE_READLINE'.

trace/Mmakefile:
	Add the new files mercury_trace_readline.[ch].
	Ensure that this new module is compiled with warnings disabled,
	to avoid spurious warnings resulting from the readline header files.
	Also simplify the code by deleting unnecessary uses of $(EXTRA_*) --
	that's handled by scripts/Mmake.vars now.

NEWS:
	Mention the readline support.

.INSTALL.in:
	Mention that it is helpful to have GNU Readline installed.

bindist/bindist.INSTALL:
	Mention that you may need to have GNU Readline installed.
1999-03-30 05:45:53 +00:00
Fergus Henderson
4acc88239f Remove support for NU-Prolog and SICStus Prolog.
Estimated hours taken: 0.25

Remove support for NU-Prolog and SICStus Prolog.

bindist/Mmakefile:
bindist/bindist.Makefile.in:
	Delete the rules for building NU-Prolog and SICStus Prolog stuff.
1999-03-16 06:11:36 +00:00
Simon Taylor
f158ec7471 Add a missing `\' from Fergus' last change.
Estimated hours taken: 0.1

bindist/Mmakefile:
	Add a missing `\' from Fergus' last change.

Index: Mmakefile
===================================================================
RCS file: /home/staff/zs/imp/mercury/bindist/Mmakefile,v
retrieving revision 1.16
diff -u -r1.16 Mmakefile
--- Mmakefile	1998/12/21 11:33:54	1.16
+++ Mmakefile	1998/12/23 23:50:26
@@ -27,7 +27,7 @@
 		  ../VERSION

 SCRIPT_FILES	= ../scripts/*.in ../scripts/*.sh-subr \
-		  ../scripts/Mmake.rules
+		  ../scripts/Mmake.rules \
 		  ../scripts/gud.el
1998-12-23 23:53:23 +00:00
Fergus Henderson
c5a69daae3 Add support for debugging Mercury code using mdb to "Gud",
Estimated hours taken: 16

Add support for debugging Mercury code using mdb to "Gud",
the Emacs "Grand Unified Debugger".  This lets you run mdb
under emacs, using the tags file provided by `mtags --emacs'
for source code linking.

scripts/gud.el:
	Add support for Mercury.

Mmake.common.in:
scripts/Mmakefile:
bindist/Mmakefile:
bindist/bindist.Makefile.in:
	Modify the installation scripts to install gud.el in
	.../lib/mercury/elisp.

.INSTALL.in:
bindist/bindist.INSTALL:
	Document what you need to add to your ~/.emacs file to
	use the Emacs mdb interface.
1998-12-21 11:34:00 +00:00
Fergus Henderson
c236043092 Fix some more bugs in the binary distribution.
Estimated hours taken: 0.75

Fix some more bugs in the binary distribution.

bindist/Mmakefile:
bindist/bindist.Makefile.in:
	Fix bugs in the handling of the mdbrc and mdb_doc files.
1998-12-07 02:37:37 +00:00
Simon Taylor
18430aaef1 Aditi compilation.
Estimated hours taken: 1200

Aditi compilation.

compiler/options.m:
	The documentation for these is commented out because the Aditi
	system is not currently useful to the general public.
	--aditi: enable Aditi compilation.
	--dump-rl: write the intermediate RL to `<module>.rl_dump'.
	--dump-rl-bytecode: write a text version of the bytecodes
		to `<module>.rla'
	--aditi-only: don't produce a `.c' file.
	--filenames-from-stdin: accept a list of filenames to compile
		from stdin. This is used by the query shell.
	--optimize-rl, --optimize-rl-cse, --optimize-rl-invariants,
	--optimize-rl-index, --detect-rl-streams:
		Options to control RL optimization passes.
	--aditi-user:
		Default owner of any Aditi procedures,
		defaults to $USER or "guest".
	--generate-schemas:
		write schemas for base relations to `<module>'.base_schema
		and schemas for derived relations to `<module>'.derived_schema.
		This is used by the query shell.

compiler/handle_options.m:
	Handle the default for --aditi-user.

compiler/hlds_pred.m:
compiler/prog_data.m:
compiler/prog_io_pragma.m:
compiler/make_hlds.m:
	Add some Aditi pragma declarations - `aditi', `supp_magic', `context',
	`naive', `psn' (predicate semi-naive), `aditi_memo', `aditi_no_memo',
	`base_relation', `owner' and `index'.
	Separate out code to parse a predicate name and arity.

compiler/hlds_pred.m:
	Add predicates to identify Aditi procedures.
	Added markers `generate_inline' and `aditi_interface', which
	are used internally for Aditi code generation.
	Add an `owner' field to pred_infos, which is used for database
	security checks.
	Add a field to pred_infos to hold the list of indexes for a base
	relation.

compiler/make_hlds.m:
	Some pragmas must be exported if the corresponding predicates
	are exported, check this.
	Make sure stratification of Aditi procedures is checked.
	Predicates with a mode declaration but no type declaration
	are no longer assumed to be local.
	Set the `do_aditi_compilation' field of the module_info if there
	are any local Aditi procedures or base relations.
	Check that `--aditi' is set if Aditi compilation is required.

compiler/post_typecheck.m:
	Check that every Aditi predicate has an `aditi__state' argument,
	which is used to ensure sequencing of updates and that Aditi
	procedures are only called within transactions.

compiler/dnf.m:
	Changed the definition of disjunctive normal form slightly
	so that a call followed by some atomic goals not including
	any database calls is considered atomic. magic.m can handle
	this kind of goal, and it results in more efficient RL code.

compiler/hlds_module.m:
compiler/dependency_graph.m:
	Added dependency_graph__get_scc_entry_points which finds
	the procedures in an SCC which could be called from outside.
	Added a new field to the dependency_info, the
	aditi_dependency_ordering. This contains all Aditi SCCs of
	the original program, with multiple SCCs merged where
	possible to improve the effectiveness of differential evaluation
	and the low level RL optimizations.

compiler/hlds_module.m:
	Add a field to record whether there are any local Aditi procedures
	in the current module.
	Added versions of module_info_pred_proc_info and
	module_info_set_pred_proc_info which take a pred_proc_id,
	not a separate pred_id and proc_id.

compiler/polymorphism.m:
compiler/lambda.m:
	Make sure that predicates created for closures in Aditi procedures
	have the correct markers.

compiler/goal_util.m:
	Added goal_util__switch_to_disjunction,
	goal_util__case_to_disjunct (factored out from simplify.m)
	and goal_util__if_then_else_to_disjunction. These are
	require because supplementary magic sets can't handle
	if-then-elses or switches.

compiler/type_util.m:
	Added type_is_aditi_state/1.

compiler/mode_util.m:
	Added partition_args/5 which partitions a list of arguments
	into inputs and others.

compiler/inlining.m:
	Don't inline memoed procedures.
	Don't inline Aditi procedures into non-Aditi procedures.

compiler/intermod.m:
	Handle Aditi markers.
	Clean up handling of markers which should not appear in `.opt' files.

compiler/simplify.m:
	Export a slightly different interface for use by magic.m.
	Remove explicit quantifications where possible.
	Merge multiple nested quantifications.
	Don't report infinite recursion warnings for Aditi procedures.

compiler/prog_out.m:
	Generalised the code to output a module list to write any list.

compiler/code_gen.m:
compiler/arg_info.m:
	Don't process Aditi procedures.

compiler/mercury_compile.m:
	Call magic.m and rl_gen.m.
	Don't perform the low-level annotation passes on Aditi procedures.
	Remove calls to constraint.m - sometime soon a rewritten version
	will be called directly from deforestation.

compiler/passes_aux.m:
	Add predicates to process only non-Aditi procedures.

compiler/llds.m:
compiler/llds_out.m:
	Added new `code_addr' enum members, do_{det,semidet,nondet}_aditi_call,
	which are defined in extras/aditi/aditi.m.

compiler/call_gen.m:
	Handle generation of do_*_aditi_call.

compiler/llds_out.m:
	Write the RL code for the module as a constant char array
	in the `.c' file.

compiler/term_errors.m:
compiler/error_util.m:
	Move code to describe predicates into error_util.m
	Allow the caller to explicitly add line breaks.
	Added error_util:list_to_pieces to format a list of
	strings.
	Reordered some arguments for currying.

compiler/hlds_out.m:
	Don't try to print clauses if there are none.

runtime/mercury_init.h:
util/mkinit.c:
scripts/c2init.in:
	Added a function `mercury__load_aditi_rl_code()' to the generated
	`<module>_init.c' file which throws all the RL code for the program
	at the database. This should be called at connection time by
	`aditi__connect'.
	Added an option `--aditi' which controls the output
	`mercury__load_aditi_rl_code()'.

compiler/notes/compiler_design.html:
	Document the new files.

Mmakefile:
bindist/Mmakefile:
	Don't distribute extras/aditi yet.

New files:

compiler/magic.m:
compiler/magic_util.m:
	Supplementary magic sets transformation. Report errors
	for constructs that Aditi can't handle.

compiler/context.m:
	Supplementary context transformation.

compiler/rl_gen.m:
compiler/rl_relops.m:
	Aditi code generation.

compiler/rl_info.m:
	Code generator state.

compiler/rl.m:
	Intermediate RL representation.

compiler/rl_util:
	Predicates to collect information about RL instructions.

compiler/rl_dump.m:
	Print out the representation in rl.m.

compiler/rl_opt.m:
	Control low-level RL optimizations.

compiler/rl_block.m:
	Break a procedure into basic blocks.

compiler/rl_analyse.m:
	Generic dataflow analysis for RL procedures.

compiler/rl_liveness.m:
	Make sure all relations are initialised before used, clear
	references to relations that are no longer required.

compiler/rl_loop.m:
	Loop invariant removal.

compiler/rl_block_opt.m:
	CSE and instruction merging on basic blocks.

compiler/rl_key.m:
	Detect upper/lower bounds for which a goal could succeed.

compiler/rl_sort.m:
	Use indexing for joins and projections.
	Optimize away unnecessary sorting and indexing.

compiler/rl_stream.m:
	Detect relations which don't need to be materialised.

compiler/rl_code.m:
	RL bytecode definitions. Automatically generated from the Aditi
	header files.

compiler/rl_out.m:
compiler/rl_file.m:
	Output the RL bytecodes in binary to <module>.rlo (for use by Aditi)
	and in text to <module>.rla (for use by the RL interpreter).
	Also output the schema information if --generate-schemas is set.

compiler/rl_exprn.m:
	Generate bytecodes for join conditions.

extras/aditi/Mmakefile:
extras/aditi/aditi.m:
	Definitions of some Aditi library predicates and the
	interfacing and transaction processing code.
1998-12-06 23:49:14 +00:00
Fergus Henderson
4592dc733b Fix some bugs in the binary distribution.
Estimated hours taken: 0.5

Fix some bugs in the binary distribution.

bindist/bindist.configure.in:
	Copy some code that was added to ../configure.in:
	- Check for `mktemp'
	- Substitute DEFAULT_MERCURY_DEBUGGER_INIT_DIR.

bindist/Mmakefile:
	Include `mprof_merge_runs' in the list of utility programs.
	Don't include `mdb' in the list of script files, since that list
	already includes `mdb.in', which is the file we want.

bindist/bindist.Makefile.in:
	Add `mdbrc' to the list of script files to install.
1998-11-24 00:26:13 +00:00
Fergus Henderson
4b0db18cf1 Change it to work properly if the `tests' directory
Estimated hours taken: 0.25

bindist/Mmakefile:
	Change it to work properly if the `tests' directory
	is at the same level as the `mercury' directory
	rather than being a subdirectory.
	Also change an incorrect variable name in a comment to fix
	an Mmake warning about using an undefined variable.
1998-11-08 22:41:55 +00:00
Zoltan Somogyi
e07b0917b3 This change makes the tracer a lot more useful.
Estimated hours taken: 90

This change makes the tracer a lot more useful. The major points are:

- you can now print the values of live variables at all trace ports,
  not just at entry and exit ports;

- you can now print the values of polymorphic variables;

- you can now set spy points;

- you can now say "give me back control when execution starts going
  forward again";

- the implementation no longer saves and restores a thousand pseudo-registers
  unnecessarily;

- the implementation no longer insists that stack layouts must be present
  either for all labels or for none;

- you can now execute programs compiled with tracing without user intervention
  if that is what you want.

The last change makes bootstrapping with --generate-trace possible in theory,
although this has not yet been done successfully.

The three major things remaining to be done to make the tracer an adequate
replacement for Prolog debugging are

- a real term browser;

- a redo capability

- being able to trace different modules at different levels
  (full/interface/none).

Two less important things to do are making the representation of typeinfos
themselves type correct :-( and not including partially clobbered variables
in trace events (we already filter out fully clobbered variables, which are
the vast majority of all at-least-partially clobbered variables).

compiler/trace.m:
	We now record information about what (non-fully-clobbered) variables
	are live where in a label that we associate with each event,
	a label we allocate for this purpose. Since the stack layouts can
	only describe registers and stack slots, generating a trace event
	may now require materializing some variables and moving some others
	from fields to registers or stack slots.

	We now recognize three kinds of events: external, normal internal
	and nondet pragma C code internal. We have different predicates
	for generating each kind of event, since the three kinds of callers
	are different and have different information available.

compiler/arg_info.m:
compiler/code_info.m:
	Move some code that always belonged in arg_info.m to arg_info.m
	from code_info.m.

compiler/code_exprn.m:
	Add a predicate to find out which registers are in use, so the tracer
	can avoid saving and restoring registers that are not use.

compiler/code_gen.m:
	Reorganize the handling of epilogs. Whereas epilogs used to generate
	the failure handling code, this is now done in generate_category_code,
	because failure handling is now complicated by having to save the
	input args for the fail event, and the setup for this naturally
	belongs in generate_category_code.

	Rename generate_{prolog,epilog} as generate_{entry,exit}, since
	this makes clear that the latter now only handles success
	continuations, not failure continuations.

	Spell prologue and epilogue correctly elsewhere.

	Also move the responsibility for the call event to
	generate_category_code.

	Move Tyson's recent additions for tracing to trace.m in a generalized
	form, since they are now needed for all events, not just call and exit.

	Remove obsolete code for eager code generation.

compiler/code_info.m:
	Add a predicate to call the new predicate in code_exprn.

	Export a predicate for trace.m.

	Considerably simplify the treatment of continuation_infos,
	with code_info structures now storing only the stuff that can change
	during code generation (due to trace events).

compiler/code_util.m:
compiler/opt_util.m:
compiler/vn_filter.m:
compiler/trace.m:
	Move some code to code_util.m from opt_util.m and generalize it a bit,
	since the new predicate in code_exprn.m now needs the functionality.
	Make trace.m and vn_filter.m refer to the moved predicates by their
	new name.

compiler/continuation_info.m:
	Major reorganization and simplification of the data structures.
	The data that changes during code generation is now stored in the
	code generator state; data that is only available after code generation
	is combined with the info from the code generator state and put into
	the HLDS; data that is available only after optimization is put
	directly into the HLDS.

	Do not add continuation_info records for labels that are not used
	either by tracing or by agc. For labels that are used by either,
	always include stack layout information if any variables are live.

	(The removal of an unnecessary layer of maybe's wasn't ready
	for this time around; Tom will remove this layer soon.)

compiler/continuation_info.m:
compiler/stack_layout.m:
	Do not associate the stack layout information at procedure entry and
	exit with the per-procedure data structure. Since we now associate this
	info with the labels of those events instead, they do not need special
	handling. However, do include a pointer to the layout structure of
	the label associated with the call event in the per-procedure data,
	so that we can later implement redo in the debugger.

compiler/stack_layout.m:
	Handle the possibility that the set of type variables that are needed
	at a point is not numbered 1-N without any missing type var numbers.
	This can happen if all variables whose types include a low-numbered
	type variable die before some of those whose types include a higher-
	numbered type variable.

compiler/*_switch*.m:
compiler/ite_gen.m:
compiler/disj_gen.m:
	When creating trace events, associate not just a goal path but
	also a pre-death set with events that represent entry to a computation
	branch. Trace.m now needs the pre-death set so that it can avoid
	trying to flush variables that are not supposed to be live in the
	computation branch being traced.

	Since putting variable values in positions that can be described
	by stack layouts (which includes only registers and stack slots,
	not fields etc) may require generating code, make sure that this
	code is generated when code_info has the appropriate contents
	(i.e. just before the generating the code the entrance to which
	the event refers to).

compiler/pragma_c_gen.m:
	Add two new event types to signify entry to the C code fragments
	executed on first call and on later reentries.

compiler/handle_options.m:
	Handle some more implications of tracing, and document them better.
	One of these changes (follow_vars) ought to allow munta to pass
	the debugger test cases.

compiler/llds_out.m:
	When generating init_{entry,label,local} operations, append a suffix
	_sl to the macro name if the label whose info is being registered
	has a stack layout record. This will cause the stack layout to be
	registered also. For other labels, the macro without the _sl will
	register NULL instead.

compiler/live_vars.m:
compiler/liveness.m:
compiler/store_alloc.m:
	If tracing is on, try to preserve the input arguments throughout
	the execution of the procedure. This is not possible if any part
	of an input argument is clobbered, but in the absence of a utility
	predicate that can test for this, we ignore the issue for now.

compiler/mercury_compile.m:
	Do not invoke continuation_info__process_instructions to add
	stack layout information about call return sites unless we are doing
	agc. (Tracing does not require this info, and it is big.)

	Pass info on which labels have stack layout records to llds_out.m.

	Fix some misleading progress messages.

compiler/{lambda,polymorphism,goal_util}.m:
	Enforce the invariant that if the signature of a procedure created
	for a lambda goal includes a type variable, it also includes the
	typeinfo for that type variable.

	(This change is from Simon.)

library/{benchmarking,std_util}.m:
	Add the _sl suffix to init_* macros in hand-written code where
	necessary.

library/require.m:
	When error is called from a program that does tracing, make it
	print the number of the last event.

runtime/mercury_{conf_param.h,trace.c}:
util/mkinit.c:
	Rename MR_USE_DEBUGGER as MR_USE_EXTERNAL_DEBUGGER, since we
	have an internal one as well.

runtime/mercury_goto.h:
	For each of the init_{entry,label,local} macros, and the macros
	they invoke, add a new variant (denoted by a _sl suffix on the
	macro name) that will cause the stack layout record associated
	with the label to be registered also. For labels initialized
	with the variants without the _sl, initialization will register
	NULL instead.

runtime/mercury_{memory,misc}.c:
	In several locations, just before exiting with a fatal error in
	a program that does tracing, print the number of the last event.

runtime/mercury_regorder.h:
	Add two new macros, MR_NUM_SPECIAL_REG and MR_MAX_SPECIAL_REG_MR
	that mercury_trace.c uses to decide how much fake_reg to save and
	restore.

runtime/mercury_stack_layout.h:
	Change the definition of MR_Var_Shape_Info to reflect the real type
	of one of its fields more closely.

	Make the type names conform to the Mercury style guide
	With_Studly_Cap_Names.

	Fix the name and the definition of MR_DETISM_DET_CODE_MODEL.

runtime/mercury_stack_layout.c:
	Use the new forms of the type names.

runtime/mercury_trace.[ch]:
runtime/mercury_wrapper.c:
	Add support for turning tracing on and off and for choosing the
	external or internal debugger.

	Modify the prototype of MR_trace() to reflect the new arg giving
	the number of the highest numbered rN register in use at the call.

	Support the new trace ports for nondet pragma C code.

runtime/mercury_trace.c:
	Implement a new command set more in line with what we intend to
	grow towards in the future:

	[N] s/S/CR to skip N events
	f/F to finish the execution of the current call
	c/C to continue to the end

	The upper case versions print events as they go, the lower case
	ones don't.

	Add several new commands:

	N g/G to go to event #N
	r to skip all following exit and fail ports until we come to
		another port type
	b module pred
		to add a breakpoint (which actually functions like a spy point)
	? to list all breakpoints
	+ to enable a numbered breakpoint
	- to disable a numbered breakpoint

	Save/restore only the necessary registers, not all of them.

	Do not indent trace events by the depth, since the depth can get
	very large (4800 in one case I looked at).

	Provide functions for other parts of the runtime and the library
	to call to print the number of the last trace event.

	There is a reference here back to the library, but this will
	go away when the tabling change is committed.

runtime/mercury_trace.[ch]:
	Add a new function, MR_trace_report. This function, which is for
	invocation in the event of a fatal error, reports what the number
	of the last event was (if tracing is enabled). This should allow
	the programmer to go more directly to the source of the problem.

runtime/mercury_wrapper.[ch]:
	Remove the long obsolete code for initializing r[123] with integers.

scripts/mdb:
	A new script for turning on the tracing code in an executable.

scripts/Mmakefile:
bindist/Mmakefile:
bindist/bindist.Makefile.in:
	Include mdb in the list of scripts to be installed.

doc/Mmakefile:
	Include mdb in the list of scripts with autogenerated man pages.

tests/misc_tests/Mmakefile:
tests/misc_tests/debugger_regs.*:
tests/misc_tests/debugger_test.*:
	Move the tests of the debugger to the new tests/debugger directory.
	In the process, give debugger_test back its original name,
	"interpreter", and give it an input script that tests the new
	debugger commands while avoiding the printing of excessively large
	terms (although they still overflow 80 columns).

tests/debugger/Mmakefile:
tests/debugger/runtests:
tests/debugger/debugger_regs.*:
tests/debugger/interpreter.*:
	The moved test cases and copied Mmakefile/runtests.

tests/debugger/queens.*:
	A new test case to test the printing of variables in polymorphic
	procedures.
1998-04-08 11:10:37 +00:00
Fergus Henderson
c784525d64 Add the extras/trailed_update directory to the list of directories
Estimated hours taken: 0.1

bindist/Mmakefile:
	Add the extras/trailed_update directory to the list of directories
	which are cleaned up before creating the binary distribution.
1998-02-11 16:58:11 +00:00
Fergus Henderson
1cde397a7d Fix a bug: it was not including the scripts/*.sh-subr files
Estimated hours taken: 0.25

bindist/Mmakefile:
	Fix a bug: it was not including the scripts/*.sh-subr files
	in the binary distribution.
1998-01-23 10:33:33 +00:00
Fergus Henderson
da637eeb27 Delete all references to `lp_solve'. It is not needed anymore,
Estimated hours taken: 0.25

.README.in:
Mmakefile:
bindist/Mmakefile:
bindist/bindist.Makefile.in:
tools/bootcheck:
	Delete all references to `lp_solve'. It is not needed anymore,
	now that we have written our own solver.
1997-10-21 14:57:05 +00:00
Fergus Henderson
f6ef3ad51f Changes needed to include `lp_solve' in the Mercury distribution.
Estimated hours taken: 2

Changes needed to include `lp_solve' in the Mercury distribution.
Note that these changes include it in the main distribution; that is temporary.
For copyright reasons, it ought to be moved to the `extras' distribution,

lp_solve/lpkit.h:
	Delete definition of `NULL' that conflicted with system header files.

lp_solve/COPYING:
	New file, explaining the copying policy.

lp_solve/Mmakefile:
	New file, contains rules for building and installing lp_solve.

Mmakefile:
bindist/Mmakefile:
bindist/bindist.Makefile.in:
	Add rules for installing lp_solve and for including it in the
	source and binary distributions.

.README.in:
	Mention lp_solve.
1997-10-09 14:04:31 +00:00
Fergus Henderson
e3c93e9150 Include the man pages in the binary distribution.
Estimated hours taken: 1

bindist/bindist.Makefile.in:
bindist/Makefile.in:
	Include the man pages in the binary distribution.

bindist/bindist.Makefile.in:
	Fix a bug where it didn't install the NUPROLOG or SICSTUS stuff
	even when configure detected that NUPROLOG / SICSTUS was present.
	Fix a bug in the rule for installing NUPROLOG.

bindist/bindist.build_vars.in:
	Put the definition of SHARED_LIBS in single quotes rather than
	double quotes, so that if it contains a back-quoted command
	(e.g. SHARED_LIBS='`gcc -print-libgcc-file-name` -lm -lc')
	it is evaluated dynamically rather than at build time.
	This avoids potential problems if users upgrade to a new gcc
	version after installing Mercury.
1997-08-14 13:53:03 +00:00
Fergus Henderson
0aa46f1171 Include the extras' and tests' directories and the
Estimated hours taken: 0.25

bindist/Mmakefile:
	Include the `extras' and `tests' directories and the
	`README.Linux' and `WORK_IN_PROGRESS' files in the binary
	distribution.
1997-08-11 07:24:15 +00:00
Fergus Henderson
64a1c52666 Localize the definition of the version number into a single file.
Automate the building of releases, including daily "rotd"
(release-of-the-day) releases.

VERSION:
	New file, defines the version number.
	Also document the general scheme for assigning version numbers.

Mmake.common.in:
	Add `include VERSION'.

Mmakefile:
bindist/Mmakefile:
configure.in:
	Use the version number in VERSION rather than hard-coding it
	in multiple places.

Mmakefile:
README:
.README.in:
INSTALL:
.INSTALL.in:
	Change things so that README and INSTALL are automatically
	generated from .README.in and .INSTALL.in respectively, using
	the version number defined in VERSION.

BUGS:
	Remove an unnecessary reference to the version number.

RELEASE_NOTES:
	Change this file so that the version number is only mentioned
	in one place.  Bump the version number here to 0.7 in preparation
	for the next release.

library/Mmakefile:
library/library.m:
library/library.m.in:
	Change things so that library.m is automatically generated from
	library.m.in using the version number in VERSION.
	Also change it so that library__version says which architecture
	it was configured for.

tools/test_mercury:
	Override the version specified in the VERSION file in the CVS
	repository with either `rotd-YYYY-MM-DD' or (when making a release)
	with a specified $RELEASE_VERSION.
	When running on murliboobo, if the version built passes all its
	tests, copy it to the /pub/mercury/beta-releases directory on
	ftp://turiel.cs.mu.oz.au.

compiler/notes/release_checklist.m:
	Change the release checklist to say that you only need to
	update the version number in VERSION rather than in 6 different
	places.  Also change the procedure for building the final
	tar file to reflect the above changes to the `test_mercury' script.
1997-07-28 08:52:15 +00:00
Fergus Henderson
04b720630b Update the copyright messages so that (a) they contain the correct years
and (b) they say "Copyright (C) ... _The_ University of Melbourne".
1997-07-27 15:09:59 +00:00
Tyson Dowd
9484d33ff9 Rename mc' as mmc'.
Estimated hours taken: 2

Rename `mc' as `mmc'.

Note: we do not change the names of variables such as MCFLAGS, just the
`mc' executable.

configure.in:
	Look for mmc not mc. If you can't find mmc to bootstrap, try for
	mc.

bindist/Mmakefile:
bindist/bindist.configure.in:
doc/Mmakefile:
doc/user_guide.texi:
scripts/Mmake.vars.in:
scripts/Mmakefile:
scripts/msl.in:
tools/expand_params:
tools/optstages:
tools/speedtest:
tools/test_mercury:
	Change references to mc into mmc.
1997-07-15 08:05:15 +00:00
Fergus Henderson
ddb73722b9 Rename all the Mmake' files as Mmakefile'. This is necessary to
avoid confusion between `Mmake' and `mmake' on case-insensitive file
systems.
1997-02-13 21:38:45 +00:00