Commit Graph

958 Commits

Author SHA1 Message Date
Peter Ross
11565225ad Enable the options --c-flag-to-name-object-file and --object-file-extension.
Estimated hours taken: 0.25

Enable the options --c-flag-to-name-object-file and --object-file-extension.
These changes are tagged with bootstrap_20000707_obj_ext.

configure.in:
    The bootstrap compiler is only recent enough if it accepts the
    --object-file-extension flag.

scripts/mmc.in:
    Used the autoconfed values to set -c-flag-to-name-object-file and
    --object-file-extension defaults.
2000-07-07 11:11:35 +00:00
Peter Ross
83cae0d2d0 When generating the .dv and .dep files use autoconfed settings for
Estimated hours taken: 8

When generating the .dv and .dep files use autoconfed settings for
such things as: object and library file extensions, and how to create a
library.  Change the compiler Mmakefiles to handle files with the new
extensions.

compiler/modules.m:
    When generating the '.dv' and '.dep' files use '.$O' and '.$A'
    instead of '.o' and '.a'.  Use $EXT_FOR_EXE when generating the
    realclean target, as you need to pass the full file name to rm.
    Use $AR_LIBFILE_OPT when creating libraries.

scripts/Mmake.vars.in:
    Set the value EXT_FOR_EXE, which is the extension which must be
    placed on executables.

Mmakefile:
library/Mmakefile:
runtime/Mmakefile:
scripts/Mmake.rules:
tools/bootcheck:
trace/Mmakefile:
    Use '.$O' for '.o' and '.$A' for '.a'.

util/Mmakefile:
    You need to remove PROGFILENAMES not PROGS, as PROGFILENAMES
    includes the executable extension.
2000-06-22 08:50:27 +00:00
Peter Ross
b96449d4ba We cannot just comment out the --c-flag-to-name-object-file and
Estimated hours taken: 0.1

mmc.in:
    We cannot just comment out the --c-flag-to-name-object-file and
    --object-file-extension flags, as that destroys the line
    continuations.  Instead remove the options from inside the execs,
    and leave them with a comment that they need to enabled when a
    compiler that understands these flags bootstraps.
2000-06-20 08:02:55 +00:00
Peter Ross
edb44545b9 Fix a bootstraping problem, the options --c-flag-to-name-object-file
Estimated hours taken: 0.1

scripts/mmc.in:
    Fix a bootstraping problem, the options --c-flag-to-name-object-file
    and --object-file-extension can't be set by the mmc.in script until
    a compiler exists that recognises them, so comment them out.  The
    defaults for these flags are the unix flags.
2000-06-19 12:29:24 +00:00
Peter Ross
1c02ce69b3 Changes needed to get
Estimated hours taken: 16

Changes needed to get
    mmc --grade hlc.gc file.m
producing an executable, using MSVC as the compiler.

compiler/options.m:
    Add the flags --c-flag-to-name-object-file and
    --object-file-extension.  --c-flag-to-name-object-file is the flag
    the C compiler uses to name object files (ie -o for gcc, /Fo for
    MSVC).  --object-file-extension is the extension used by object
    files on the current system.

compiler/mercury_compile.m:
    Use the values of --c-flag-to-name-object-file and
    --object-file-extension to generate the command line to compile
    C files.

scripts/mmc.in:
    Set the default values of the two new flags from the autoconfed
    settings.

configure.in:
    Set the value for CYGPATH, a utility which transforms between unix
    and window paths.  This is just echo under unix.

scripts/ml.in:
    Use the autoconfed extension for the library files.
    Use the autoconfed flag to add a path to list of directories to be
    searched for libraries.
    Make static libraries the default on cygwin systems.
    Factor out the code which determines all the flags to be passed to
    the linker.
    Add an autoconfed variable LINK_OPT_SET which is the flag used to
    indicate that all the options following this flag are to be passed
    on to the linker.
    Use the autoconfed setting for CYGPATH to transform the path to
    static libraries into the correct format.
2000-06-16 16:37:46 +00:00
Fergus Henderson
230e3a0182 Fix a quoting bug in Pete's recent change.
Estimated hours taken: 0.5

scripts/Mmake.vars.in:
	Fix a quoting bug in Pete's recent change.
2000-06-16 00:21:39 +00:00
Peter Ross
f442c6e74c Document output_c_file_intro_and_grade in the interface.
Estimated hours taken: 0.25

compiler/llds_out.m:
    Document output_c_file_intro_and_grade in the interface.

compiler/mlds_to_c.m:
    Document that ANSI/ISO C doesn't support empty arrays and
    structures, so the handling of them by mlds_to_c may not be
    correct.
    s/NULL/0/ when initializing empty arrays, to make it more likely
    that the C compiler will accept the initialization.

compiler/passes_aux.m:
    In invoke_shell_command call sh instead of bash.

scripts/mgnuc.in:
    Use the value of $COMPILER instead of $CC when determining the C
    compiler.
2000-06-14 14:54:09 +00:00
Peter Ross
a7044d60d2 Fix a bug on dec-alpha-osf3.2 where
Estimated hours taken: 0.1

Fix a bug on dec-alpha-osf3.2 where
    mgnuc -c mercury_accurate_gc.c -omercury_accurate_gc.c
gives the error
    mips-tfile:mercury_accurate_gc.o: No such file or directory

configure.in:
    Set OBJFILE_OPT to be "-o " on unix systems.  Note the trailing
    space.

scripts/Mmake.vars.in:
    Quote OBJFILE_OPT to ensure that the trailing space is preserved.
2000-06-13 10:12:49 +00:00
Peter Ross
01ebbaafb5 Name library files with the default extension for the system used.
Estimated hours taken: 2

Name library files with the default extension for the system used.

Mmake.common.in:
    Record the default extension for library files.
    Add the variable BOEHMGC_MAKEFILE only needed for building the
    compiler.

scripts/Mmake.vars.in:
    Delete BOEHMGC_MAKEFILE as it is only needed for building the
    compiler.

configure.in:
    Define the default for EXT_FOR_SHARED_LIB to be the extension
    for libraries defined in Mmake.common.

boehm_gc/NT_MAKEFILE:
    Use .lib instead of .a, seeing we only use this Makefile for
    building the library on win32 systems.

Mmakefile:
boehm_gc/Mmakefile:
browser/Mmakefile:
compiler/Mmakefile:
library/Mmakefile:
runtime/Mmakefile:
trace/Mmakefile:
    Use the variable defined in Mmake.common for the extension of
    library files.
2000-06-08 13:06:49 +00:00
Peter Ross
a68df3d95f Allow compilation of the mercury compiler *ONLY* in the grade hlc.gc
Estimated hours taken: 40

Allow compilation of the mercury compiler *ONLY* in the grade hlc.gc
using the Microsoft Visual C++ compiler (MSVC).  This is still
work-in-progress.

configure.in:
    Test to see whether or not we are using the Microsoft compiler.
    Don't fail if we can't interpret return values from system.

boehm_gc/Mmakefile:
    Use NT_MAKEFILE if we are using MSVC.

boehm_gc/NT_MAKEFILE:
    Apply the the changes to boehm_gc/Makefile to this file.

browser/Mmakefile:
library/Mmakefile:
runtime/Mmakefile:
trace/Mmakefile:
    Use the correct executable to create libraries.
    Use AR_LIBFILE_OPT to name the library.

compiler/llds_out.m:
    Export output_c_file_intro_and_grade so that the correct header can
    be placed at the start of each C file.

compiler/mlds_to_c.m:
    Output the header at the start of each C file, so that configure
    doesn't delete the file when checking the compatability with
    the configured settings.
    When initializing empty arrays place a dummy entry in the array, so
    that the MSVC compiler generates a symbol for that array.

compiler/passes_aux.m:
    Add invoke_shell_command.  This predicate wraps commands with
    a bash -c 'command ' when shell scripts aren't supported by the
    target system.

compiler/mercury_compile.m:
compiler/modules.m:
    Use invoke_shell_command instead of invoke_system_command for shell
    scripts.

library/io.m:
    Call _unlink in io_rename_file, when compiling with MSVC.


runtime/mercury_wrapper.c:
    Initialise MR_runqueue_head so that the segment containing this
    variable is registered with the garbage collector.  This stops
    intermittent failures of the GC_is_visible() test.

runtime/mercury_conf.h.in:
    Define MR_WIN32 when we are using MSVC.

runtime/mercury_memory.c:
runtime/mercury_memory_handlers.c:
runtime/mercury_memory_zones.c:
runtime/mercury_prof.c:
runtime/mercury_reg_workarounds.c:
runtime/mercury_reg_workarounds.h:
runtime/mercury_signal.c:
runtime/mercury_timing.c:
runtime/mercury_timing.h:
runtime/mercury_trace_base.c:
util/mkinit.c:
    Only include unistd.h and sys/times.h when they exist.
    MSVC doesn't have SIGBUS so #ifdef sections which refer to it.

scripts/Mmake.rules:
    Use /Fo instead of -o to generate .o files if compiling with MSVC.

scripts/Mmake.vars.in:
    Define AR to use the autoconfed executable for linking.

scripts/mgnuc.in:
    Only add option -Wno-uninitialized if we are using gcc.

util/Mmakefile:
    Explicitly locate the getopt src, and use it in compiling the
    utilities.
2000-06-08 07:59:13 +00:00
Fergus Henderson
24845e89b7 Document the -H and --high-level-code options and the
Estimated hours taken: 1

compiler/options.m:
doc/user_guide.texi:
scripts/init_grade_options.sh-subr:
	Document the -H and --high-level-code options and the
	associated `hlc' grade.

NEWS:
	Document the MLDS back-end.

HISTORY:
	Add a section on "MLDS back-end history".
2000-05-24 05:18:30 +00:00
Fergus Henderson
6c6cffc50f Allow -H' as a synomym for --high-level-code',
Estimated hours taken: 0.1

scripts/parse_grade_options.sh-subr:
	Allow `-H' as a synomym for `--high-level-code',
	to match the behaviour of mmc.
2000-05-24 05:03:04 +00:00
Fergus Henderson
2befe35249 In the rule for install_grades', invoke install_hdrs',
Estimated hours taken: 0.25

Mmakefile:
scripts/Mmake.rules:
	In the rule for `install_grades', invoke `install_hdrs',
	so that we install the header files too, not just the
	`.a' and `.so' files.  This is needed for MLDS grades.
2000-05-19 07:17:32 +00:00
Simon Taylor
864ce4f08b Fix a bug in Fergus' last change which broke the
Estimated hours taken: 0.1

scripts/Mmake.rules:
	Fix a bug in Fergus' last change which broke the
	`lib%.install_grades' target. Run `mmake <module>.depend'
	rather than `mmake lib<module>.depend'.
2000-05-19 01:54:53 +00:00
Fergus Henderson
b06f663025 Change the Mmake rules for `mmake install' so that they install the
Estimated hours taken: 3

Change the Mmake rules for `mmake install' so that they install the
compiler-generated header files for MLDS grades.

compiler/modules.m:
	Generate a new rule for `lib<module>.install_hdrs' in the `.dep' files.
	If --high-level-code is enabled, this rule installs the header
	files, otherwise it does nothing.

scripts/Mmake.rules:
	Make `lib<module>.install' depend on `lib<module>.install_hdrs'.

library/Mmakefile:
	- Override the default definition of `mercury.hs', so that
	  the header file names include the `mercury.' prefix that
	  the MLDS back-end uses for header files in the standard library.
	- Simplify the code by using the automatically generated rule for
	  `liblibrary.install_ints' rather than hand-coding it, and by
	  using `install_lib_dirs' and `install_grade_dirs' (which
	  are defined by scripts/Mmake.rules) rather than hand-coding
	  a rule for `install_dirs'.

Mmakefile:
scripts/Mmake.rules:
scripts/mercury_cleanup_install:
	In the rules for `mmake install_grades', make sure to move
	the `.h' and `.dep' files out of the way too, like we do for the
	`.c', `.o', etc. files, since the contents of the `.h' and `.dep'
	files now depend on the grade.
2000-05-17 12:07:19 +00:00
Simon Taylor
247a5bd308 Fix a bug in the handling of the `--aditi' option -- it was
Estimated hours taken: 0.25

scripts/c2init.in:
	Fix a bug in the handling of the `--aditi' option -- it was
	performing a shift even though `--aditi' does not take an
	argument.
2000-05-12 05:13:33 +00:00
Simon Taylor
bde558d7ac Modify the Mmake rules to install libraries so that the user can
Estimated hours taken: 1

Modify the Mmake rules to install libraries so that the user can
specify commands to copy files and make directories. This is useful
if the user wants more control over the ownership and permissions of
the created files and directories.

scripts/Mmake.rules:
compiler/modules.m:
	Use $(INSTALL) to copy a file into its installed location.
	Use $(INSTALL_MKDIR) to create directories.

scripts/Mmake.vars.in:
	Set the default value of INSTALL to `cp' and
	INSTALL_MKDIR to `mkdir -p'.

doc/user_guide.texi:
	Document the new Mmake variables.
2000-05-11 03:46:29 +00:00
Fergus Henderson
aa3f54f73f More work on the MLDS back-end.
Estimated hours taken: 6

More work on the MLDS back-end.

runtime/mercury.c:
	Fix a cut-and-paste bug in the code for compare/3:
	I forgot to add `break' after each case of a `switch' statement.

library/builtin.m:
library/private_builtin.m:
	Replace the hand-coded definition of builtin_{compare,unify}_pred
	in builtin.m with ordinary Mercury clauses in private_builtin.m.
	This ensures that it works with the MLDS back-end.
	(It also means that these procedures call error/1 rather than
	MR_fatal_error(), so you get an exception rather than a
	program abort.)

runtime/mercury.h:
runtime/mercury.c:
	Add declarations and definitions of the compare and unify
	procedures for the builtin types.  (For some types,
	the definitions here are still just stubs.)

runtime/mercury.h:
runtime/mercury.c:
runtime/mercury_init.h:
	Add some hacks to work-around the current lack of support
	for `pragma export'.

runtime/mercury_type_info.c:
	If MR_HIGHLEVEL_CODE is defined, don't #include "mercury_imp.h",
	since it is not needed.

runtime/mercury_wrapper.c:
runtime/mercury_wrapper.h:
runtime/mercury_init.h:
util/mkinit.c:
scripts/c2init.in:
	Add support for the MLDS back-end to the program start-up
	code.
2000-05-08 16:11:22 +00:00
Fergus Henderson
d30500f2a3 Some fixes to the Mmake auto-dependency support for
Estimated hours taken: 1

Some fixes to the Mmake auto-dependency support for
the MLDS back-end.

scripts/Mmake.rules:
	When creating the dependencies, pass $(ALL_GRADEFLAGS) to mmc,
	since the `--high-level-code' option, which is a grade option
	(it corresponds to the `hlc' base grade) affects the dependencies.

compiler/mlds_to_c.m:
	Put the `#include' statements in the `.c' files rather than
	in the `.h' files.
2000-04-19 07:31:54 +00:00
Simon Taylor
5932842f3c Add some options to ml for use in linking programs which use Aditi.
Estimated hours taken: 1

Add some options to ml for use in linking programs which use Aditi.
The Aditi API library uses threads internally, so programs which use
it must link with the thread libraries.

scripts/ml.in:
	Add option `--use-thread-libs' to link with the thread libraries
	when the Mercury code doesn't use coroutining/parallelism,
	but a C library does.

	For DEC OSF/1 use `-lpthreads -lmach -lc_r' to link in the threads
	libraries.
2000-04-07 01:21:27 +00:00
Fergus Henderson
b376c06e11 Report an error if any of the grade components are unknown.
Estimated hours taken: 0.1

scripts/parse_grade_options.sh-subr:
	Report an error if any of the grade components are unknown.
2000-03-25 08:14:42 +00:00
Fergus Henderson
364b867a37 Fix a quoting bug in my previous change.
Estimated hours taken: 0.1

scripts/mmc.in:
	Fix a quoting bug in my previous change.
2000-03-24 20:16:52 +00:00
Fergus Henderson
179d8be613 Fix a bug where tools/bootcheck was failing the
Estimated hours taken: 1

Fix a bug where tools/bootcheck was failing the
tests/hard_coded/split_c_files test case.

scripts/mmc.in:
	Add a new environment variable MERCURY_MC_ALL_C_INCL_DIRS
	which can be used to override MERCURY_C_INCL_DIR;
	it is similar to the MERCURY_ALL_C_INCL_DIRS used by mgnuc,
	except that it should contain `--c-include-directory' options
	rather than `-I' options.

tools/bootcheck:
	Pass down MERCURY_MC_ALL_C_INCL_DIRS,
	just like the way we pass down MERCURY_ALL_C_INCL_DIRS.
2000-03-24 20:11:51 +00:00
Fergus Henderson
d9c496b1a9 Fix a portability problem: we need a ";" before the "}".
Estimated hours taken: 0.5

scripts/Mmake.rules:
	Fix a portability problem: we need a ";" before the "}".
2000-02-10 08:19:33 +00:00
Fergus Henderson
3d45791e77 Fix some bugs in the MLDS back-end support.
Estimated hours taken: 0.75

Fix some bugs in the MLDS back-end support.

scripts/parse_grade_options.sh-subr:
	Fix a bug: s/high_level/highlevel/g

scripts/final_grade_options.sh-subr:
	Ensure that --high-level-code disables the use of the low-level
	gcc extensions, as is done in compiler/handle_options.m.
2000-02-08 15:32:36 +00:00
Fergus Henderson
6446f4755a Fix a bug: with --thread-safe, for dec-alpha-osf3.2,
Estimated hours taken: 0.25

scripts/ml.in:
	Fix a bug: with --thread-safe, for dec-alpha-osf3.2,
	it was linking with the wrong thread libraries.
2000-02-07 07:40:15 +00:00
Fergus Henderson
d4d8b5bfb1 Fix a permissions problem: don't fail if `chmod u+w' fails.
Estimated hours taken: 0.25

scripts/Mmakefile:
	Fix a permissions problem: don't fail if `chmod u+w' fails.
	That can happen even if the file is writable, if you don't
	own it; if the failure is really going to cause a problem
	then the problem will be detected when we try to write
	to the file (e.g. next time it is installed).
2000-02-01 22:08:37 +00:00
Peter Ross
d91b5ab9eb Fix a bug the that the caller context was being obtained from the
Estimated hours taken: 1

mercury/scripts/gud.el:
    Fix a bug the that the caller context was being obtained from the
    wrong part of the line.
2000-01-15 07:08:48 +00:00
Zoltan Somogyi
0f3fecd7a9 Add back these rules for bootstrapping purposes.
Estimated hours taken: 1

scripts/Mmake.rules:
	Add back these rules for bootstrapping purposes.
2000-01-14 01:33:43 +00:00
Warwick Harvey
2f5cfeaaf4 Pass the extra C include directories to mgnuc, in case there are
Estimated hours taken: 0.5

scripts/Mmake.vars.in:
	Pass the extra C include directories to mgnuc, in case there are
	header files installed there.
2000-01-11 07:59:46 +00:00
Warwick Harvey
d0b2a61a62 Added some extra dependencies to the generated `.d' files, so that local
Estimated hours taken: 3

Added some extra dependencies to the generated `.d' files, so that local
`.int', `.opt', etc. files shadow the installed versions properly (e.g. for
when you're trying to build a new version of an installed library).
This saves the user from having to add these explicitly if they have
multiple libraries installed in the same installation hierarchy which
aren't independent (e.g. one uses another).

This change is necessary due to the way the combination of search paths
and pattern rules works in Make.

compiler/modules.m:
	Generate the extra dependencies when writing `.d' files.

scripts/Mmake.rules:
	Deleted some obsoleted dependency rules.
2000-01-11 07:53:42 +00:00
Fergus Henderson
af07efc3e5 Handle module qualifiers properly: module-qualify all symbols, and then
Estimated hours taken: 0.75

scripts/mtags:
	Handle module qualifiers properly: module-qualify all symbols, and then
	output tags for the fully module-qualified version and also for any
	partially qualified or unqualified versions of each symbol.
1999-12-23 21:37:20 +00:00
Fergus Henderson
9599c55ae8 Implement new grades and options for the MLDS back-end.
Estimated hours taken: 3

Implement new grades and options for the MLDS back-end.

compiler/options.m:
	Rename --highlevel-c as --highlevel-code.
	Add new option --highlevel-data.

compiler/mercury_compile.m:
scripts/mgnuc.in:
	Convert the grade options --highlevel-code,
	--highlevel-data, and --gcc-nested-functions
	into C flags -DMR_HIGHLEVEL_CODE, -DMR_HIGHLEVEL_DATA,
	and -DMR_USE_GCC_NESTED_FUNCTIONS respectively.

compiler/handle_options.m:
scripts/parse_grade_options.sh-subr:
scripts/init_grade_options.sh-subr:
scripts/final_grade_options.sh-subr:
scripts/ml.in:
	Add new grades `hl', `hlc', `hl_nest', and `hlc_nest'.
	Add code to handle the new options and grades.

scripts/ml.in:
	If --high-level-code is set, then don't invoke the
	demangler, since it doesn't (yet) understand the new
	name mangling scheme.
1999-12-21 09:56:46 +00:00
Peter Ross
f87f9d2120 Ensure that the none.gc and none grades compile using a compiler
Estimated hours taken: 24

Ensure that the none.gc and none grades compile using a compiler
other than gcc.  This is not completely tested as lcc on linux can't
generate code for boehm_gc, and 'cc -std1' on the alpha runs out of
memory while trying to link the compiler.  However the compiler does
bootstrap using just gcc and also with lcc with boehm_gc compiled by
gcc.

configure.in:
    -Wl,opt1,opt2 syntax is not supported by lcc instead use -Wlopt1
    -Wopt2.

compiler/export.m:
    Only output a label declaration if that label is exported, as the
    static label declarations are not legal C.

library/io.m:
compiler/stack_layout.m:
    Replace escape sequence \x with \\x in pragma c code.

library/array.m:
library/std_util.m:
    Define what the struct is before using it, so the correct size for the
    struct can be calculated.

library/private_builtin.m:
    Replace escape sequence \x with \\x in pragma c code.
    Ensure that there is at least one local variable so that the
    structure definition for holding the local vars contains something.

runtime/mercury_faultaddr.h:
    Remove an unnecessary cast.

runtime/mercury_reg_workarounds.h:
    #include sys/time.h for FD_ZERO().

runtime/mercury_stack_trace.h:
    Remove an extraneous ',' which was causing warnings.
1999-11-25 09:09:46 +00:00
Fergus Henderson
241d9559f9 Fix a problem reported by Luke Evans <Luke.Evans@seagatesoftware.com>.
Estimated hours taken: 0.25

Fix a problem reported by Luke Evans <Luke.Evans@seagatesoftware.com>.

scripts/Mmakefile:
	Make sure that we make the previously installed mdbrc
	(if any) writable before trying to install the new mdbrc.
1999-11-23 08:49:37 +00:00
Fergus Henderson
822caf112f Fix a problem where `ml --shared' was trying to create a so_locations
Estimated hours taken: 0.75

Fix a problem where `ml --shared' was trying to create a so_locations
file in `../so_locations'; that is ugly, and causes trouble if the
parent directory is not writable, for example.

configure.in:
Mmake.common.in:
	Add a new variable SO_LOCATIONS_DIR, defined (for compilation
	of the Mercury compiler itself) as equal to $(MERCURY_DIR),
	which is the root of the Mercury source distribution tree.
	Change the definition of LINK_SHARED_OBJECT so that it uses
	that variable rather than hard-coding `../'.
	This required splitting LINK_SHARED_OBJECT into two variables,
	one for Mmake and one for Bourne shell, since the two languages
	have different syntaxes for referencing variables.

scripts/ml.in:
	Use LINK_SHARED_OBJECT_SH rather than LINK_SHARED_OBJECT.

bindist/bindist.configure.in:
bindist/bindist.build_vars.in:
	Pass down the value of the new LINK_SHARED_OBJECT_SH variable.
1999-11-23 07:24:05 +00:00
Fergus Henderson
8429d49925 Improve the Emacs mdb interface, in particular by using
Estimated hours taken: 6

Improve the Emacs mdb interface, in particular by using
the new mdb line number support.

scripts/gud.el:
	Find the source location by parse the line numbers that mdb
	prints, rather than using tags to find the current source
	location.

	Add support for setting a breakpoint on the current line.
	Also add a few other commands to the MDB menu, in particular
	the commands for interactive queries and a command to list
	all the current aliases.

	Ensure that the program execution buffer is displayed
	when you start, so that if you type the wrong command name,
	the error message is visible rather than in a buffer that
	is not displayed.
1999-11-18 17:27:14 +00:00
Fergus Henderson
9d276af482 Fix a bug: the code was depending on the first' and second'
Estimated hours taken: 0.5

scripts/gud.el:
	Fix a bug: the code was depending on the `first' and `second'
	functions, which are defined only if you load the `viper'
	package.  The fix is to use `car' and `cdr' instead.
1999-11-18 06:10:21 +00:00
Fergus Henderson
7dabf6baa2 Wait for the demangler to exit before exiting.
Estimated hours taken: 0.5

scripts/ml.in:
	Wait for the demangler to exit before exiting.
	This avoids confusing output when `mmake' exits before
	the demangler has finished its output.
1999-11-12 07:05:23 +00:00
Zoltan Somogyi
22840901fd Fix potential problems with the way we were handling grade components: the
Estimated hours taken: 5

Fix potential problems with the way we were handling grade components: the
places that know about grade components were not being kept totally in sync.
This change fixes previous damage and aims to prevent future damage.

The file runtime/mercury_grade.h contains a list of all the files in the
compiler that know about grade components. All these files now process the
grade components in the same order, so that they can be checked for consistency
more easily.

runtime/mercury_grade.h:
	Add the list.

runtime/mercury_conf_param.h:
	Remove a comment about an obsolete grade component.

scripts/init_grade_options.sh-subr:
	Remove initializations of variables that do not correspond to grade
	components, add missing initializations of shell variables that do
	correspond to grade components, and concentrate the grade options
	component of usage messages here, to prevent double maintenance.

	Update list of user scripts.

scripts/final_grade_options.sh-subr:
	Add missing initializations in processing the --grade superoption.

	Standardize the order of processing options, and the indentation.

	Update list of user scripts.

scripts/c2init.in:
	Take the usage message for grade component options from
	init_grade_options.sh-subr.

scripts/mgnuc.in:
	Take the usage message for grade component options from
	init_grade_options.sh-subr.

	Standardize the order of processing grade options, and separate the
	processing of grade options and non-grade options.

scripts/ml.in:
	Take the usage message for grade component options from
	init_grade_options.sh-subr.

	Standardize the order of processing grade options. Process some missing
	ones.

compiler/handle_options.m:
	Standardize the order of processing grade options.

	Remove code to handle an obsolete grade component.
1999-11-09 01:45:43 +00:00
Fergus Henderson
1876077d12 Check for -lnsl, since on i386-pc-solaris2.7 that is needed
Estimated hours taken: 0.75

configure.in:
	Check for -lnsl, since on i386-pc-solaris2.7 that is needed
	for the socket stuff.

scripts/ml.in:
	Link with -lnsl if necessary.
1999-11-04 20:12:53 +00:00
Fergus Henderson
1897bd8591 Pass the new `--explain-link-errors' option to mdemangle.
Estimated hours taken: 0.25

scripts/ml.in:
        Pass the new `--explain-link-errors' option to mdemangle.

	This may cause bootstrapping problems if you try to compile
	with a version of `mdemangle' that doesn't support that option.
	So I've tagged the old version of scripts/ml.in with the tag
	`bootstrap_19991029_mdemangle' to make bootstrapping easier.
1999-10-29 05:09:38 +00:00
Fergus Henderson
7654602989 Minor efficiency improvment in the rules for *.install and
Estimated hours taken: 0.1

scripts/Mmake.rules:
	Minor efficiency improvment in the rules for *.install and
	*.install_grades: use `{ ...; }' rather than `( ... )', to
	avoid creating unnecessary processes.
1999-10-25 14:26:56 +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
98e67d2201 Fix a problem where the test cases were sometimes failing
Estimated hours taken: 0.5

Fix a problem where the test cases were sometimes failing
if old /tmp/mmake* directories were left lying around.

scripts/ml.in:
scripts/mmake.in:
	When creating the temporary directory, if mkdir fails (e.g.
	because that directory already exists), then try again with a
	different directory name.  Only report an error if it fails 20
	times in a row.
1999-10-11 05:47:12 +00:00
Fergus Henderson
88eca71d1a Fix a bug: take care to avoid infinite loops when processing
Estimated hours taken: 0.5

scripts/mtags:
	Fix a bug: take care to avoid infinite loops when processing
	typeclass and instance declarations.
1999-10-07 11:54:04 +00:00
Fergus Henderson
a69a85395d Undo a previous change: don't pass --explain-link-errors to
Estimated hours taken: 0.25

scripts/ml.in:
	Undo a previous change: don't pass --explain-link-errors to
	$MDEMANGLE yet, since it causes bootstrapping problems.
1999-10-01 19:12:06 +00:00
Fergus Henderson
17dc28cf0c Improve the error messages for linking objects compiled in different grades.
Estimated hours taken: 1

Improve the error messages for linking objects compiled in different grades.

util/mdemangle.c:
	Check for `MR_grade_*' and `MR_runtime_grade', and if they are
	found, print out a message explaining the cause of the problem.
	But only do that if a new option `--explain-link-errors' is set,
	so that this message will only come out when you get a message
	from the linker, not when you invoke mdemangle manually e.g.
	via `nm *.o | mdemangle'.

scripts/ml.in:
	Pass the new `--explain-link-errors' option to mdemangle.
1999-09-30 21:33:14 +00:00
Mark Brown
99b8372463 Added `test_mdbrc'.
Estimated hours taken: 0

Added `test_mdbrc'.
1999-09-17 06:15:17 +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