195 Commits

Author SHA1 Message Date
Fergus Henderson
52001de6f6 Make sure that we delete `a.out', which seems to be
Estimated hours taken: 0.1

Mmakefile:
	Make sure that we delete `a.out', which seems to be
	created by configure, before packaging up the source
	distribution.
1999-11-23 08:55:44 +00:00
Fergus Henderson
9df5aae26f Change the rules for `install_grades' and
Estimated hours taken: 0.75

Mmakefile:
	Change the rules for `install_grades' and
	`install_split_library' to handle `--use-subdirs' properly.

	Also change those rules so that they call
	`scripts/mercury_cleanup_install' if the build fails
	at a point which might leave the directories in an
	inconsistent state.
1999-10-26 14:37:14 +00:00
Fergus Henderson
ec0beb577c Since the profiler directory refers to the trace directory's
Estimated hours taken: 0.1

Mmakefile:
 	Since the profiler directory refers to the trace directory's
	libmer_trace.a library file, make the profiler target depend
	on the trace target.
1999-09-28 14:03:47 +00:00
Zoltan Somogyi
c47b43e6ea Since the profiler directory refers to the browser directory's init
Estimated hours taken: 0.1

Mmakefile:
	Since the profiler directory refers to the browser directory's init
	file, make the profiler target depend on the browser target.
1999-09-28 06:24:58 +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
d1938d4019 Improve build and installation on MS-Windows.
Estimated hours taken: 3

Improve build and installation on MS-Windows.

configure.in:
Mmake.common.in:
	Set extension for executables (.exe for Windows, nothing
	otherwise).
	Detect presence of perl, makeinfo, texi2dvi and dvips.

Mmakefile:
README.MS-Windows:
	Remove old preinstall and postinstall hacks for windows.

compiler/Mmakefile:
profiler/Mmakefile:
util/Mmakefile:
	Use the extension for executables when installing.

doc/Mmakefile:
	Don't generate documentation unless the appropriate tools
	are available.  Use the auto-detection of perl,
	makeinfo, texi2dvi and dvips to build documentation.

doc/generate_mdb_doc:
	Don't insist on rm being in /bin
1999-07-20 21:30:02 +00:00
Fergus Henderson
0b12173872 Ensure that mmake realclean' removes the file configure.log'.
Estimated hours taken: 0.1

Mmakefile:
	Ensure that `mmake realclean' removes the file `configure.log'.
1999-06-07 08:01:10 +00:00
Fergus Henderson
ab8545cec1 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:54 +00:00
Fergus Henderson
c3959e4076 Fix a bug that caused problems when building the compiler in a
Estimated hours taken: 0.25

Mmakefile:
	Fix a bug that caused problems when building the compiler in a
	grade with profiling enabled: it was using an (unset) shell
	variable $$grade when it should have been using the Make variable
	$(GRADE).
1999-03-25 18:32:59 +00:00
Zoltan Somogyi
863d8db916 Fix typo in dependency list.
Estimated hours taken: 0.1

Mmakefile:
	Fix typo in dependency list.
1999-03-18 22:00:49 +00:00
Fergus Henderson
f1c225b169 Avoid a double-maintenance problem with the version numbers
Estimated hours taken: 0.25

Mmakefile:
mercury-compiler.spec:
.mercury-compiler.spec.in:
	Avoid a double-maintenance problem with the version numbers
	in `mercury-compiler.spec' by building that file
	automatically from `.mercury-compiler.spec.in', substituting
	the appropriate value for @VERSION@.
1999-03-18 11:14:17 +00:00
Fergus Henderson
bcd65c7c82 Fix a small bug: s/INSTALL_INFODIR/INSTALL_INFO_DIR/
Estimated hours taken: 0.1

Mmakefile:
	Fix a small bug: s/INSTALL_INFODIR/INSTALL_INFO_DIR/
1999-03-13 01:34:21 +00:00
Warwick Harvey
c84e668266 Removed the assumption from the target `tar' that the root
Estimated hours taken: 1.5

Mmakefile:
	Removed the assumption from the target `tar' that the root
	source directory is named "mercury".
1999-03-12 01:00:22 +00:00
Fergus Henderson
02eed62807 At the end of the installation, print out the same helpful message
Estimated hours taken: 0.25

Mmakefile:
	At the end of the installation, print out the same helpful message
	about adding stuff to your PATH, etc. that is output by the Makefile
	in the binary distribution (i.e. bindist/bindist.Makefile.in).
1999-03-10 20:17:35 +00:00
Fergus Henderson
9fe33e5ee7 Change the pre- and post-install hacks for Windows to
Estimated hours taken: 0.25

Mmakefile:
	Change the pre- and post-install hacks for Windows to
	handle `info_to_mdb'.
	Also, make the `doc' directory depend on the `util' directory,
	since it uses `util/info_to_mdb' to create the mdb documentation.
1998-12-16 18:15:16 +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
3a44b25868 Fix a bug in the code for automatically building binary distributions
Estimated hours taken: 0.5

tools/test_mercury:
	Fix a bug in the code for automatically building binary distributions
	(it was accessing `$version', which had not yet been defined.)
	Also change it to build "unstable" binary distributions, in the
	case where some of the tests failed, as well as "stable" ones.

Mmakefile:
	Add a new target `fullarch' which just echos $FULLARCH,
	for use by tools/test_mercury.
1998-11-13 08:04:21 +00:00
Fergus Henderson
7707b0b699 Do `chmod -R a+r *' before building the tar files,
Estimated hours taken: 0.1

Mmakefile:
	Do `chmod -R a+r *' before building the tar files,
	to ensure that all the files in them are readable by everyone.
1998-11-06 11:09:32 +00:00
Fergus Henderson
77cda6dabc Fix a bug which had crept in which meant that you needed to have `info'
Estimated hours taken: 0.25

Fix a bug which had crept in which meant that you needed to have `info'
installed in order to build from the source distribution.

Mmakefile:
	In the rule for `mmake tar', make doc/mdb_doc.

Index: Mmakefile
===================================================================
RCS file: /home/staff/zs/imp/mercury/Mmakefile,v
retrieving revision 1.26
diff -u -r1.26 Mmakefile
--- Mmakefile	1998/10/22 05:22:07	1.26
+++ Mmakefile	1998/10/28 08:39:39
@@ -212,7 +212,7 @@
 	cd compiler && $(SUBDIR_MMAKE) cs tags
 	cd profiler && $(SUBDIR_MMAKE) depend
 	cd profiler && $(SUBDIR_MMAKE) cs tags
-	cd doc && $(SUBDIR_MMAKE) info html dvi
+	cd doc && $(SUBDIR_MMAKE) info html dvi mdb_doc
 	cd bindist && $(SUBDIR_MMAKE) bindist.configure
 	# the following command might fail on Windows?
 	-cd bindist && $(SUBDIR_MMAKE) bindist.build_vars
1998-10-28 08:43:31 +00:00
David Overton
1051bc1164 Fix browser dependencies.
Estimated hours taken: 0.1

Mmakefile:
	Fix browser dependencies.
1998-10-22 05:22:07 +00:00
Zoltan Somogyi
8ddce575d4 Introduce two new directories, trace and browser, containing libraries
Estimated hours taken: 10

Introduce two new directories, trace and browser, containing libraries
holding the C and Mercury code of the debugger respectively. (Although
the browser directory does not have a browser in it yet, the browser
should soon become its biggest component.) Take the opportunity to
rename the existing libraries, for consistency.

After this change, the linking order becomes:

	the object of the auto-generated init file
	program object files
	trace library (libmer_trace.a)
	browser library (libmer_browser.a)
	standard library (libmer_std.a)
	runtime library (libmer_rt.a)
	Boehm collector (libgc.a)

To avoid circularities, libraries cannot contain direct calls to
any routines that are defined in libraries (or object files) that
occur earlier in the above list.  Any such calls must be made into
indirect calls via function pointers.

In particular, there was a circularity caused by the library calling
MR_trace() which invokes the tracer which in turn invokes the
library.  This circularity was broken by having MR_trace(),
which is defined in the runtime, call the tracer indirectly via
a global variable named MR_trace_func_ptr.  This global variable
is initialized by the auto-generated *_init.c file.

To avoid linking in the tracer even when it is not being used,
this global variable is only set to point to MR_trace_real()
if you're using a debugging grade or if c2init was invoked
with the `-t' flag.  Otherwise it is set to MR_trace_fake()
which just prints an error message telling the user to
rebuild the executable with debugging enabled.

Makefile.DLLs:
	Reserve random locations for the two new libraries. Whether they work
	will be decided by testing on Windows.

Mmake.common.in:
	Add variables naming the new directories, and create variables
	naming the libraries.

Mmakefile:
	Add targets for the new directories, and modify existing rules
	as appropriate.

browser/Mmakefile:
	Mmakefile for the new directory, modelled on library/Mmakefile.

browser/browser_library.m:
	Umbrella file for the new directory, modelled on library/library.m.

{browser,library}/debugger_interface.m:
	Moved this file from library to browser without change.

browser/help.m:
	A new module for the help system of the debugger. Not yet used.

compiler/Mmakefile:
	Update to refer to the new directories and libraries where
	appropriate.

compiler/mercury_compile.m:
	If we are doing tracing, then pass -t instead of -i to c2init.

compiler/modules.m:
	When generating the .dep file, get the grade flags passed to c2init.

doc/Mmakefile:
	Remove the special treatment of library/debugger_interface.m.

library/Mmakefile:
	Update to refer to the new directories and libraries where
	appropriate, and to conform to the new name of the library.

library/library.m:
	Do not import debugger_interface.

profiler/Mmakefile:
	Update to refer to the new directories and libraries where
	appropriate.

runtime/Mmakefile:
	Update to refer to the new directories and libraries where
	appropriate, and to conform to the new name of the library.

	Remove references to files being moved to the trace directory.

runtime/mercury_init.h:
	Refer to the automatically generated dll header file by its new name
	(renamed because the runtime library is renamed).

	Add declarations to support the new global variable MR_trace_func_ptr.

runtime/mercury_memory_handlers.c:
runtime/mercury_memory_zones.c:
runtime/mercury_misc.c:
	Remove inappropriate #includes of "mercury_trace.h", and substitute
	a #include of "mercury_trace_base.h" if necessary.

{runtime,trace}/mercury_trace.[ch]:
{runtime,trace}/mercury_trace_external.[ch]:
{runtime,trace}/mercury_trace_internal.[ch]:
	Move these files from the runtime to the trace directory.

	The only changes are the removal from mercury_trace.h of declarations
	added to runtime/mercury_trace_base.h, and the change from MR_trace
	to MR_trace_real.

runtime/mercury_trace_base.[ch]:
	Define MR_trace(), which does an indirect call through
	MR_trace_func_ptr if the event should be traced.

	Define MR_trace_fake, which just prints an error message.
	Its address will be assigned to MR_trace_func_ptr if tracing
	is not enabled.

	Define the types needed by the signature of MR_trace.

	Fix an old bug: s/MERCURY_TRACE_PERMANENT_H/MERCURY_TRACE_BASE_H/.

runtime/mercury_wrapper.[ch]:
	Add the new global variable MR_trace_func_ptr.

scripts/c2init.in:
	Add a new option, -t/--trace, which enables tracing by causing the
	address of MR_trace_real to be assigned to MR_trace_func_ptr.

	Have this option be implied by the grade. Also have the old option
	-i (need initialization code) be implied by the grade, as well as by
	-t.

scripts/ml.in:
	Include the new libraries in the link command.

tests/debugger/Mmakefile:
	Include -t instead of -i in the list of c2init options. (-t implies
	-i.)

tools/bootcheck:
	Copy and build the new directories as appropriate. The trace directory
	is treated like the runtime, the browser directory is treated like the
	library.

trace/Mmakefile:
	Mmakefile for the new directory, modelled on runtime/Mmakefile.

util/mkinit.c:
	Add the new option -t, as discussed above.
	Mmakefile for the new directory, modelled on runtime/Mmakefile.

util/Mmakefile:
	Specify -O0, since with the default optimization level, gcc on
	cyclone ignores the assignment of TRUE to need_tracing when -t is
	given (!!!).
1998-09-29 05:12:06 +00:00
Tyson Dowd
eaef8ca939 Change the release tar.gz file generation scheme.
Estimated hours taken: 1.5

Change the release tar.gz file generation scheme.

We now generate:
	mercury-compiler-rotd-YYYY-MM-DD-unstable.tar.gz
	mercury-extras-rotd-YYYY-MM-DD-unstable.tar.gz
	mercury-tests-rotd-YYYY-MM-DD-unstable.tar.gz
each night if we bootstrap, even if we don't pass the tests.

If we pass the tests, we generate:
	mercury-compiler-rotd-YYYY-MM-DD.tar.gz
	mercury-extras-rotd-YYYY-MM-DD.tar.gz
	mercury-tests-rotd-YYYY-MM-DD.tar.gz

And for numbered releases we create:
	mercury-compiler-0.8.tar.gz
	mercury-extras-0.8.tar.gz
	mercury-tests-0.8.tar.gz

Mmakefile:
	Change the tar target to create the newly named files.

tools/test_mercury:
	Change the behaviour of copying files to the beta-releases
	directory.
1998-09-10 03:21:38 +00:00
Fergus Henderson
111ba0a31e Add a missing $(deps_subdir) before a reference to library.dep,
Estimated hours taken: 0.1

Mmakefile:
	Add a missing $(deps_subdir) before a reference to library.dep,
	so that it works with --use-subdirs.
	It already had the $(dep_subdir) in front of all the
	references to compiler.dep and profiler.dep, I had just
	accidentally missed on occurrence for library.dep.
1998-06-01 01:28:14 +00:00
Fergus Henderson
9856ec7b08 Ensure that things get recompiled properly if you modify the
Mmakefile:
library/Mmakefile:
	Ensure that things get recompiled properly if you modify the
	VERSION file and the run `mmake' from the top-level directory.

Also an unrelated change:

Mmakefile:
	Add a new `install_main' target, which is like
	`install' except that it doesn't invoke `install_grades'.
1998-04-28 06:15:14 +00:00
Fergus Henderson
6f065be64a Fix some Mmakefile errors that were diagnosed by `--warn-undefined-variables'.
Estimated hours taken: 1

Fix some Mmakefile errors that were diagnosed by `--warn-undefined-variables'.
Also, make a small fix to mmake.in and add empty definitions for various
Mmake variables to avoid spurious warnings.

scripts/mmake.in:
	Add ` dep*' to the patterns for which we do not
	pass `--warn-undefined-variables'; previously it
	matched "$@" against `dep*', which did not catch the
	case of `mmake -k depend'.
		       ^^^

scripts/Mmake.vars.in:
	Add definition for `ds_subdir'.
	Define `MLLIBS' as `$(EXTRA_MLLIBS)' rather than empty,
	and add empty definition for `EXTRA_MLLIBS'.
	Add empty definition for `MAIN_TARGET'.

Mmakefile:
	Fix misspelling: `deps_subdir' not `dep_subdir'.
	Add empty definitions for `PREINSTALL_HACK', `POSTINSTALL_HACK',
	and `MMAKEFLAGS'.

boehm_gc/Mmakefile:
	Add empty definition for `PROF'.

runtime/Mmakefile:
	Add empty definition for `DLL_CFLAGS'.

library/Mmakefile:
	Add empty definition for `CHECK_TERM_OPTS'.

compiler/Mmakefile:
	Add empty definition for `MTAGSFLAGS'.
1998-03-30 13:03:17 +00:00
Fergus Henderson
7ebc79e927 Fix some problems with the `--use-subdirs' option.
Estimated hours taken: 6

Fix some problems with the `--use-subdirs' option.
The compiler itself now compiles and bootstraps fine with --use-subdirs.

compiler/modules.m:
	Put `.h' files in the source directory, rather than
	in the `Mercury/hs' subdirectory.

compiler/mercury_compile.m:
scripts/Mmake.rules:
	If `--use-subdirs' is enabled, pass `-I.' to the C compiler,
	so that #include statements work relative to the source directory
	rather than relative to the `Mercury/cs' subdirectory.

scripts/Mmake.vars.in:
	Define $(cs_subdir), $(os_subdir) etc. variables;
	these are set to the directory to use for .c, .o, etc. files,
	(including the trailing `/'), or to the empty string,
	if --use-subdirs is not set.

scripts/Mmake.rules:
	Use $(cs_subdir), $(os_subdir) etc. to avoid the code
	duplication created by my previous change to handle
	--use-subdirs.
	Also add lots of comments, and reorder the code
	in a more logical order.

Mmakefile:
library/Mmakefile:
compiler/Mmakefile:
profiler/Mmakefile:
tests/term/Mmakefile:
tests/valid/Mmakefile:
	Use $(cs_subdir), $(os_subdir) etc. to fix a few hard-coded
	file-names (e.g. *.dep, *_init.[co], tree234.o) that were
	used in some of the rules.

library/Mmakefile:
	Add `rm -f tags' to the rule for `mmake realclean'.

tools/bootcheck:
	Add `--use-subdirs' option (defaults to setting of the
	MMAKE_USE_SUBDIRS environment variable).
	Change the code which compares the stage2 & stage3 C files
	to use the appropriate location for them based on the
	setting of this option.
1998-03-20 02:58:33 +00:00
Simon Taylor
20015fca68 Fix a cut-and-paste bug - mercury_profile.dep is in
Estimated hours taken: 0.1

Mmakefile:
	Fix a cut-and-paste bug - mercury_profile.dep is in
	the profiler directory not the compiler directory.
1998-03-18 04:28:34 +00:00
Fergus Henderson
f91d7ceb24 Fix a bug in the rule for `mmake tar':
Estimated hours taken: 0.1

Mmakefile:
	Fix a bug in the rule for `mmake tar':
	to make all the interface files in the library directory,
	it needs to do `mmake all-ints', not `mmake ints opts'.
	(Also there is no need to explicitly make the `ints' in the
	compiler or profiler directory.  The necessary int files will
	be built automatically when building the .c files.)
1998-03-07 13:16:34 +00:00
Tyson Dowd
2d2f9f358b Fix the boehm_gc problem with libc6 on Linux systems.
Estimated hours taken: 2

Fix the boehm_gc problem with libc6 on Linux systems.
This is a Mercury only fix because the boehm_gc doesn't use autoconf.
(It's not the world's most elegant fix, but it does fix the problem).

Mmakefile:
	Remove boehm_gc/mercury_boehm_gc_conf.h when cleaning up.

README.Linux:
	Update the documentation about this fix.

configure.in:
	Check whether we should #include <asm/sigcontext.h> in
	the GC.

boehm_gc/os_dep.c:
	Only include <asm/sigcontext.h> if it will work.

boehm_gc/mercury_boehm_gc_conf.h.in:
	New configuration header file.
1998-02-11 03:57:56 +00:00
Fergus Henderson
7052e8f8e3 Fix some installation problems on MS Windows.
Estimated hours taken: 1

Fix some installation problems on MS Windows.

Mmakefile:
	Fix a bug: the definitions of the variables
	PREINSTALL_HACK_FOR_WINDOWS and POSTINSTALL_HACK_FOR_WINDOWS
	preceded their use.  The fix was just to move the definitions
	closer to near the start of the file.

README.MS-Windows:
	Update the documentation to reflect gnu-win32 b18.
	Update the patch at the end to reflect the above change to Mmakefile.
1998-02-06 16:04:07 +00:00
Fergus Henderson
45b051eef5 Move most of the stuff in the patch file at the end of
Estimated hours taken: 1

Mmakefile:
README.MS-Windows:
	Move most of the stuff in the patch file at the end of
	README.MS-Windows into Mmakefile, because the patch file
	was a maintenence problem (people would change Mmakefile
	and not update the patch).
1997-11-21 12:02:41 +00:00
Tyson Dowd
7ce7d489a2 Cleaned up runtime directory.
Estimated hours taken: 2

Cleaned up runtime directory.

runtime/*.c:
	- Renamed all .c files as mercury_*.c
	  Some have been renamed to make their purpose clearer.
	  	call.mod -> mercury_ho_call.c

runtime/*.h:
	- Moved contents of .h files to mercury_*.h
	- *.h now contain #include mercury_*.h. They be removed later.
	- Updated references to conf.h -> mercury_conf.h

runtime/conf.h.in:
	- Renamed conf.h.in as mercury_conf.h.in.
	  Didn't leave a forwarding header for this one, as conf.h was
	  never part of the repository anyway.

runtime/Mmakefile:
	- Convert lists to one-per-line lists.
	- Add mercury_accurate_gc.h to HDRS.
	- Remove all .mod files
	- Make sure runtime.init uses the ORIG_CS not MOD_CS.
	- Fix the rules for "clean_o" and "clean_mod_c", which used
	  wildcards like "*.o" to remove files.  The one that removed
	  all .c files corresponding with *.mod, instead of using MOD_CS
	  was particularly vicious.
	- Cope with the file renamings.

configure.in:
	- Cope with the file renamings.
1997-11-20 02:04:40 +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
8c70c60703 If building or installing `lp_solve' fails, ignore the error.
Estimated hours taken: 0.25

Mmakefile:
	If building or installing `lp_solve' fails, ignore the error.
	This avoids portability problems with lp_solve's reliance
	on yacc and lex causing too much hassle...
1997-10-15 15:55:10 +00:00
Fergus Henderson
6addf3914c Change the rule for `mmake tar' so that the
Estimated hours taken: 0.25

Mmakefile:
	Change the rule for `mmake tar' so that the
	mercury-<version>-extras.tar.gz file will unpack into a subdirectory
	mercury-<version>/extras rather than into the directory
	mercury-<version>-extras.
1997-10-11 15:26:54 +00:00
Fergus Henderson
3b421523e0 Fix a couple of bugs in the Mmakefile stuff for the lp_solve directory.
Estimated hours taken: 0.25

Fix a couple of bugs in the Mmakefile stuff for the lp_solve directory.

Mmakefile:
	Add `lp_solve' target.

lp_solve/Mmakefile:
	Add dependency so that `install_lp_solve' will build `lp_solve'
	before trying to install it.
1997-10-11 10:57:06 +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
11a58b232c Fix a bug in the rule for install_grades that broke the
Estimated hours taken: 3

Mmakefile:
        Fix a bug in the rule for install_grades that broke the
        libraries installed for grade `asm_fast.gc.tr' on
        mercury.cs.mu.oz.au.  The problem was that it was not
        removing the C files in the library directory, which had
        been generated for a different grade, before making the new grade.
1997-10-07 11:05:09 +00:00
Tyson Dowd
2e697fdd3c Split the distribution into
Estimated hours taken: 0.5

Split the distribution into
	mercury-$VERSION.tar.gz		(main distribution)
	mercury-$VERSION-extras.tar.gz 	(extras directory)

Mmakefile:
	Change rule for `tar' target to build
	mercury-$(VERSION)-extras.tar.gz as well, and not put
	extras in the main distribution.

tools/test_mercury:
	Deal with extras tar files when creating stable releases, and
	putting them on the ftp site.
1997-09-18 06:04:12 +00:00
Fergus Henderson
3c386fb2e8 In the rule for `mmake tar', make sure that README and INSTALL
Estimated hours taken: 0.1

Mmakefile:
	In the rule for `mmake tar', make sure that README and INSTALL
	are up-to-date.
1997-07-28 15:09:34 +00:00
Fergus Henderson
9777cf86b5 Localize the definition of the version number into a single file.
Estimated hours taken: 2

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:51:53 +00:00
Fergus Henderson
e1f4f14638 Update the copyright messages so that (a) they contain the correct years
Estimated hours taken: 1.5

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 14:58:47 +00:00
Fergus Henderson
8122fe73ef Fix a warning about the rule for making `library/library.init'
Estimated hours taken: 0.5

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:10 +00:00
Fergus Henderson
007c1a94d1 Change the rule for `mmake tar' so that it includes the test
Estimated hours taken: 1

mercury/Mmakefile:
	Change the rule for `mmake tar' so that it includes the test
	directory but does not include the `trial', `bytecode',
	or `lp_solve' directories.
1997-06-10 02:19:06 +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