Commit Graph

10 Commits

Author SHA1 Message Date
Mark Brown
d465fa53cb Update the COPYING.LIB file and references to it.
Discussion of these changes can be found on the Mercury developers
mailing list archives from June 2018.

COPYING.LIB:
    Add a special linking exception to the LGPL.

*:
    Update references to COPYING.LIB.

    Clean up some minor errors that have accumulated in copyright
    messages.
2018-06-09 17:43:12 +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
Julien Fischer
c6a30b9942 Make compilation of extras/references more reliable.
Branches: main, 11.07

Make compilation of extras/references more reliable.

extras/references/Makefile:
extras/references/Mmakefile:
extras/references/Mercury.options:
	Use mmc --make to build and install this library (as we do with
	some of the other extras packages) instead of mmake.  This allows
	us to sue the grade filtering mechanism in mmc --make to ensure
	that we only install the library in grades that support trailing.

	Fix a number of problems that prevent this library installing cleanly:

	+ don't require the presence of asm_fast grades; build the library in
	the default grade with the trail segment component added.

	+ use trail segment grades instead of fixed sized trail grades (the latter
	are not installed anymore unless specifically requested by the user).

	+ install the C header file that is part of this library.

	+ delete ancient workarounds for supporting shared libraries on Linux.

extras/references/tests/Mmakefile:
extras/references/samples/Mmakefile:
	Conform to the above changes.

	Don't assume that the extension for static libraries is .a; it's
	not on some systems.

extras/references/global.m:
	Add a feature set pragma specifying that trailing is required.

extras/references/nb_reference.m:
	s/__/./

extras/lex/lex.m:
	Unrelated change: avoid using an obsolete function.
2011-11-16 07:12:49 +00:00
Julien Fischer
e001ac930a Fixes and cleanups for extras/references.
Estimated hours taken: 0.2
Branches: main, release

Fixes and cleanups for extras/references.

extras/references/Mmakefile:
	Don't emit warnings about the module global not exporting anything.

extras/references/global.m:
	Add a missing interface declaration and reformat the list of
	module imports.

extras/references/tests/ref_test.m:
extras/references/tests/glob_test.m:
extras/references/tests/glob_test_2.m:
	Add missing `MR_' prefixes.

	Use the new foreign language interface.

	Add missing character escapes.
2006-04-21 04:56:53 +00:00
Fergus Henderson
67afe2c9fc Various changes to make it easier to build the extras.
Estimated hours taken: 0.5
Branches: main, release

Various changes to make it easier to build the extras.

extras/dynamic_linking/Mmakefile:
	Don't require the existence of "../../../mercury/browser".

extras/posix/README:
	Mention that it may be necessary to set MLLIBS.

extras/references/Mmakefile:
	Don't include the "asm_fast.tr" grade in LIBGRADES, since by
	default the Mercury standard library doesn't get installed in
	that grade.
2004-02-17 00:00:24 +00:00
Fergus Henderson
dced016cc1 Fix a problem where different packages in the `extras' distribution
Estimated hours taken: 3
Branches: main, release

Fix a problem where different packages in the `extras' distribution
were being installed in different directories when you specified
INSTALL_PREFIX in the Mmake.params file.  Some honoured the INSTALL_PREFIX
setting, some appended "/extras", and some ignored it completely.

Also, add `clean' and `realclean' targets for the extras directory hierarchy,
and fix a few other minor bugs.

extras/lazy_evaluation/Mmakefile:
	Include Mmake.params, which previously wasn't included at all
	in this file.

extras/logged_output/Mmakefile:
extras/odbc/Mmakefile:
extras/quickcheck/Mmakefile:
	Append "/extras" to INSTALL_PREFIX, which previously wasn't done
	at all in these directories.

extras/cgi/Mmakefile:
extras/complex_numbers/Mmakefile:
extras/concurrency/Mmakefile:
extras/curs/Mmakefile:
extras/curses/Mmakefile:
extras/dynamic_linking/Mmakefile:
extras/moose/Mmakefile:
extras/posix/Mmakefile:
	Move the line `INSTALL_PREFIX := $(INSTALL_PREFIX/extras)'
	to before the include of Mmake.params, so as not to override
	the user's setting (only override the default setting).

extras/Mmakefile:
extras/concurrency/Mmakefile:
	Add `clean' and `realclean' targets.

extras/posix/Mmakefile:
	Add MGNUCFLAGS = --no-ansi, since this is needed on some systems.

extras/quickcheck/Mmakefile:
	Add "depend", "all", and "install" targets.
	Ensure that the "check" target runs the test program.

extras/quickcheck/qcheck.m:
	Set the exit status to non-zero if a test fails.

extras/references/Mmakefile:
	Adjust the setting of LIBGRADES to account for the fact that
	$(GRADE) is no longer implicitly included in $(LIBGRADES).
2003-01-16 10:44:26 +00:00
Zoltan Somogyi
a1cd1a1633 Optionally test the extras directory during bootchecks.
Estimated hours taken: 4

Optionally test the extras directory during bootchecks.

tools/bootcheck
	Add an option, -e, for testing the extras directory. Rename the
	-T/--test-only option as -n/--no-bootcheck, since it does not prevent
	the testing of the extras.

	Bootcheck only test the subdirectories in extras which have an
	Mmakefile and which can be tested in all grades and in all setups.

extras/*/Mmakefile:
	Updates to include extras/Mmake.params if it exists (to get the
	parameters, including grades, of the bootcheck) and to add a check
	target, which in most cases does not do anything yet (which means
	that the only testing we do is checking that the program compiles
	all right). Making "mmake check" do something meaningful will be
	up to the authors of the various subdirectories involved.

	In many cases, add .PHONY annotations on the relevant targets,
	and copyright notices.

extras/aditi/NOBOOTTEST:
	Prevent the automatic testing of the aditi subdirectory from
	bootcheck, since this can be done only on a machine with Aditi
	installed.

extras/aditi/NOBOOTTEST:
	Prevent the automatic testing of the aditi subdirectory from
	bootcheck, since this can be done only on a machine with Aditi
	installed.

extras/aditi/NOBOOTTEST:
	Prevent the automatic testing of this subdirectory from bootcheck,
	since this can be done only on a machine with Aditi installed.

extras/dynamic_linking/NOBOOTTEST:
	Prevent the automatic testing of this subdirectory from bootcheck,
	since this can be done only on a machine with the dl library already
	installed.

extras/logged_out/NOBOOTTEST:
	Prevent the automatic testing of this subdirectory from bootcheck,
	since this can be done only in grades with the right kind of stream
	support.

extras/odbc/NOBOOTTEST:
	Prevent the automatic testing of this subdirectory from bootcheck,
	since this can be done only on a machine with ODBC installed.

extras/references/NOBOOTTEST:
extras/trailed_update/NOBOOTTEST:
	Prevent the automatic testing of this subdirectory from bootcheck,
	since this can be done only in trailing grades.

extras/*/.nocopyright:
	Mention the NOBOOTTEST files in the relevant .nocopyright files.
2000-11-21 23:52:54 +00:00
Warwick Harvey
9338420eb6 Fixed/cleaned up a few things in extras/references:
Estimated hours taken: 1

Fixed/cleaned up a few things in extras/references:

extras/references/Mmakefile:
        Made the building of the programs in the `samples' subdirectory part
        of a new `install_check' target (rather than the old `check'
        target), since the Mmakefile in that directory assumes the library
        has been installed already.

extras/references/tests/ref_test.m:
        Updated so it works again.  It was trying to do I/O in contexts
        which weren't det.  Basically introduced a new impure pragma c_code
        predicate for dumping the value of an integer to standard output.
2000-01-28 03:32:33 +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
Warwick Harvey
9cbccbd5dc This change adds a new extras directory, "references".
Estimated hours taken: 70 (plus whatever pets spent when he wrote the
original version of this)

This change adds a new extras directory, "references".  This directory
contains two impure reference type modules and a module that allows scoped
non-backtrackable update, along with examples of using them and tests.
These modules are intended to be useful when HAL is retargetted to Mercury,
for implementing global variables (backtracking and non-backtracking), and
may also be useful for the debugger.

In order to implement these features, a new memory zone "global heap" was
added to the runtime system, for a heap which is not reclaimed on failure,
along with a pair of functions for copying terms to this heap.

runtime/mercury_deep_copy.c:
runtime/mercury_deep_copy.h:
	Added two functions, MR_make_permanent() and
	MR_make_partially_permanent(), which essentially do a deep copy of a
	term to the global heap.
	(In conservative GC grades, these functions actually do nothing).

runtime/mercury_engine.c:
runtime/mercury_engine.h:
	Added fields global_heap_zone and e_global_hp (for the global heap
	and its heap pointer) to the MR_mercury_engine_struct, along with
	appropriate initialisation, etc.
	Defined MR_heap_zone, MR_solutions_heap_zone, and
	MR_global_heap_zone for convenient access to the corresponding field
	of the relevant Mercury engine.

runtime/mercury_memory.c:
	Added code for handling the size and zone size of the global heap.

runtime/mercury_regorder.h:
runtime/mercury_regs.h:
	Defined MR_global_hp (the global heap pointer for general use),
	along with corresponding other changes.

runtime/mercury_wrapper.c:
runtime/mercury_wrapper.h:
	Added declarations and initialisation of the size and zone_size of
	the global_heap.
	Added an entry for MR_GLOBAL_HP_RN to print_register_usage_counts()
	(plus missing entries for MR_SOL_HP_RN, MR_MIN_HP_REC and
	MR_MIN_SOL_HP_REC).

New files:

extras/references/Mmakefile:
	Mmakefile for building and testing these modules.

extras/references/README:
	Description of contents of this directory.

extras/references/global.m:
	A wrapper module for building a library containing the nb_reference,
	reference and scoped_update modules.

extras/references/nb_reference.m:
	Implements references which are not backtracked on failure.

extras/references/reference.m:
	Implements references which *are* backtracked on failure.

extras/references/scoped_update.m:
	Allows nested scoping of non-backtracking references.

extras/references/samples/Mmakefile:
extras/references/samples/max_of.m:
extras/references/samples/max_test.exp:
extras/references/samples/max_test.m:
	An example of using a non-backtracking reference (to find the
	maximum of the solutions generated by a predicate), with tests.

extras/references/tests/Mmakefile:
extras/references/tests/ref_test.exp:
extras/references/tests/ref_test.m:
	Some tests of references (backtracking and non-backtracking) and
	scoping.
1998-06-18 04:30:48 +00:00