Commit Graph

8 Commits

Author SHA1 Message Date
Zoltan Somogyi
ecdc285bc7 Split the existing browser library into two libraries, by making the
Estimated hours taken: 10
Branches: main

Split the existing browser library into two libraries, by making the
program_representation module into its own library. This is useful because
the compiler refers to program_representation.m, whose code thus needs to be
linked into compiler executables even if the compiler isn't compiled with
debugging enabled. By creating a new library for this module, we avoid any
chance of the linker dragging in the rest of the modules in the browser
library. (This is a problem with an upcoming diff.).

The name of the new library is "mdbcomp", because the intention is that it
contain code that is shared between the debugger and the compiler. This means
mostly the definitions of data structures that the compiler generates for the
debugger, and the predicates that operate on them.

Mmake.common.in:
	Allow MDB_COMP_ as a prefix for symbol names in the browser directory.

Mmake.workspace:
	Add a make variable holding for the name of the new library, and
	add the name to the relevant lists of libraries.

	Avoid duplicating the lists of filenames that need to be updated
	when adding new libraries or changing their names.

Mmakefile:
	Use make variables to refer to library names.

browser/mdbcomp.m:
browser/mer_mdbcomp.m:
	Add these files as the top modules of the new library.

browser/program_representation.m:
	Make program_representation.m a submodule of mdbcomp, not mdb.

browser/program_representation.m:
browser/browser_info.m:
	Move a predicate from program_representation.m to browser_info.m
	to avoid the mdbcomp library depend on the browser library, since
	this would negate the point of the exercise.

browser/mdb.m:
	Delete program_representation.m from the list of submodules.

browser/Mmakefile:
	Update this file to handle the new module.

browser/Mercury.options:
	Mention the new module.

browser/*.m:
	Update the lists of imported modules. Import only one browser module
	per line.

compiler/notes/overall_design.html:
	Document the new library.

compiler/compile_target_code.m:
	Add the mdbcomp library to the list of libraries we need to link with.

compiler/prog_rep.m:
trace/mercury_trace_internal.c:
	Import program_representation.m by its new name.

scripts/c2init.in:
	Centralize knowledge about which files need to be updated when the list
	of libraries changes here.

scripts/c2init.in:
scripts/ml.in:
tools/binary:
tools/binary_step:
tools/bootcheck:
tools/linear:
tools/lml:
	Update the list of libraries programs are linked with.
2003-10-27 06:00:50 +00:00
Simon Taylor
5d693f5a1c Factor out the common Mmake code to set up the mmc, mgnuc
Estimated hours taken: 8
Branches: main

Factor out the common Mmake code to set up the mmc, mgnuc
and ml flags when building the Mercury compiler and libraries.
Use options, not environment variables. This will make it simpler
to use `mmc --make' to compile the compiler.

Mmake.workspace:
	Similar to tools/lmc. Sets up Mmake variables to
	use the library files in a workspace rather than
	an installed library.

configure.in:
	Check for the `--no-mercury-stdlib-dir' mmc option.
	Bootstrap CVS tag: bootstrap_20020429_stdlib_dir

Mmake.common.in:
*/Mmakefile:
	Move common code into Mmake.workspace.

browser/Mmakefile:
library/Mmakefile:
	Avoid invoking the linker explicitly when creating
	libraries of Mercury code. That won't work well
	with `mmc --make'.

tools/bootcheck:
tests/Mmake.common:
	Use Mmake.workspace instead of setting up environment
	variables in bootcheck.

scripts/Mmake.vars.in:
	mmc compiles split C files to object code itself,
	so pass `--cflags "$(ALL_CFLAGS)"' to mmc when
	compiling with `--split-c-files'.

browser/interactive_query.m:
	Use `mmc --make' when compiling the query. This is needed
	to make tests/debugger/interactive_query.m work when linking
	against a workspace using options rather than environment
	variables.  This also fixes a bug -- mmc options were being
	passed to ml.

	Clean up after the query.

tests/debugger/Mmakefile:
tests/debugger/interactive.inp:
tests/debugger/interactive.inp.subdirs:
tests/debugger/interactive.inp.nosubdirs:
tests/debugger/interactive.exp:
tests/debugger/interactive.exp2:
	Generate the input file to this test so that MCFLAGS
	and MC_MAKE_FLAGS (from Mmake.workspace) are used when
	compiling queries.

	tests/debugger/Mmakefile now sets SHELL to /usr/local/bash
	to allow the use of $(...) style command substitution
	(`...` style command substitution can't be nested).

tests/warnings/Mmakefile:
tests/dppd/Mmakefile:
	Include tests/Mmake.common.

tools/*:
scripts/c2init.in:
scripts/ml.in:
	Update the lists of files containing the library names.
2002-04-29 08:22:08 +00:00
Fergus Henderson
c2047349bf Change the options for these tools so that the short form of
Estimated hours taken: 0.5
Branches: main

tools/bootcheck:
tools/binary:
tools/binary_step:
tools/linear:
tools/makebatch:
tools/test_mercury:
	Change the options for these tools so that the short form of
	negative options, such as `--no-test-suite', is `-t-' rather
	than `-t', for consistency with the option handling convention
	used by other Mercury programs such as `mmc' and `ml'.

	I made this change because I found it very confusing
	that `-t' *disabled* the tests in the `tests' directory,
	whereas `-e' *enabled* the tests in the `extras' directory.
	With this change, all options that disable things
	are now of the form `-<letter>-' or `--no-<long-name>'.
2001-12-12 08:02:10 +00:00
Zoltan Somogyi
d670b5bf58 Fix some software rot in these scripts: we now need main.[co] in
Estimated hours taken: 0.2

tools/binary:
tools/divide:
tools/linear:
	Fix some software rot in these scripts: we now need main.[co] in
	the top level directory, and END_MODULE is now spelt MR_END_MODULE.
2001-11-05 06:06:20 +00:00
David Overton
ed91b801be Fix some scripts in the tools directory to work with the new
Estimated hours taken: 0.5

Fix some scripts in the tools directory to work with the new
directories and library names.

tools/binary:
tools/binary_step:
tools/linear:
	Update these scripts to work properly with the new browser and
	trace directories and the renamed libraries.

Mmake.common.in:
scripts/c2init.in:
scripts/ml.in:
	Add tools/binary, tools/binary_step and tools/linear to the
	list of files that know about library names.
1998-10-09 05:41:58 +00:00
Fergus Henderson
3ab044af46 Fix a warning about the rule for making `library/library.init'
clashing with the default rule for creating a `.init' file
in the automatically-generated `library/library.dep' file.
The initialization for the library is different to the
standard automatically-generated initialization, because
the library contains C code that needs explicit initialization.
(because it has BEGIN_MODULE ... END_MODULE macros in it); this
C code hence has `INIT blah' comments in it naming functions that
need to be inserted in the `.init' file so that they will be called
at initialization time.

Mmakefile:
library/Mmakefile:
compiler/Mmakefile:
profiler/Mmakefile:
tools/bootcheck:
tools/linear:
tools/binary:
	s/library.init/libmercury.init/g
1997-07-21 06:26:43 +00:00
Zoltan Somogyi
7a3f8d3a1c Link to absolute, not relative path names, since relative path names
Estimated hours taken: 2

bootcheck, binary, linear:
	Link to absolute, not relative path names, since relative path names
	do not work back across symbolic links.

binary, linear:
	Allow the user to give an initial list of suspects.

assemble, binary, linear:
	Allow negative searches, i.e. searches in which the base version is
	the bad version and we want to see which module "fixes" the problem
	caused by the other modules, as opposed to normal searches in which
	we are looking for the module that introduces the problem.
1996-05-29 11:00:24 +00:00
Zoltan Somogyi
e333b692d8 A new tool for doing linear searches on the compiler.
Estimated hours taken: 0.5

A new tool for doing linear searches on the compiler.
1996-05-21 02:13:48 +00:00