Commit Graph

958 Commits

Author SHA1 Message Date
Tyson Dowd
f9674e6fb8 Remove references to .garb files.
Estimated hours taken: 0.5

compiler/modules.m:
scripts/Mmake.rules:
	Remove references to .garb files.
	We are not going to use a separate link phase for accurate gc
	anymore.
1997-06-03 07:01:10 +00:00
Fergus Henderson
c3e9d9bba5 Work around a new (mis-)feature present in GNU Make 3.74
Estimated hours taken: 8

scripts/Mmake.rules:
	Work around a new (mis-)feature present in GNU Make 3.74
	but not in 3.71: recent versions will not update the timestamp
	of a target if the commands for that target are just whitespace.
	Instead, we need to use an explicit sh `:' command.
1997-05-23 00:39:14 +00:00
David Jeffery
a044511f1a Added documentation of the new MERCURY_SP_OVERRIDING_LIB_OBJS (etc.)
Estimated hours taken: 0.5

Added documentation of the new MERCURY_SP_OVERRIDING_LIB_OBJS (etc.)
environment variables, and improved documentation of other Prolog related
Mercury environment variables.

scripts/msl.in:
	document MERCURY_SP_OVERRIDING_LIB_OBJS and add documentation for some
	other variables
scripts/mnl.in:
	document MERCURY_NU_OVERRIDING_LIB_OBJS, and add documentation for some
	other variables
1997-05-19 02:17:02 +00:00
David Jeffery
381f5e328c Improved the error messages for map__lookup failure by writing out the types
Estimated hours taken: 4

Improved the error messages for map__lookup failure by writing out the types
of the values and keys.

Also, since the Prologs cannot handle the type_of functions, a `normal'
version of map__lookup has been added to map.nu.nl

To accomodate this, this change implements a mechanism to override
definitions of predicates for particular Prologs. This mechanism makes
explicit which .no or .ql files contain preds overriding others, and so
makes things a bit more robust.

library/map.m:
	Implement the better error messages.
library/map.nu.nl:
	The Prolog version of map__lookup.
library/Mmakefile:
	Set new environment variables, MERCURY_NU_OVERRIDING_LIB_OBJS or
	MERCURY_SP_OVERRIDING_LIB_OBJS to be the files which are to be
	linked, but contain definitions which override others.
scripts/mnl.in:
	Link everything in MERCURY_NU_OVERRIDING_LIB_OBJS last.
scripts/msl.in:
	Link everything in MERCURY_SP_OVERRIDING_LIB_OBJS last.
1997-05-17 03:27:18 +00:00
Fergus Henderson
c878e0cb72 Work-around a bug in gcc 2.6.3 on mips that caused a gcc internal error
Estimated hours taken: 0.25

Work-around a bug in gcc 2.6.3 on mips that caused a gcc internal error
when compiling compiler/bytecode.c.

scripts/mgnuc.in:
	Ensure that bytecode.c is compiled with `-O1' rather than `-O2'.
1997-04-20 02:15:57 +00:00
Fergus Henderson
0d2a940783 Fix a bug with the `-v' (verbose) option: it was not echoing
Estimated hours taken: 0.25

scripts/ml.in:
	Fix a bug with the `-v' (verbose) option: it was not echoing
	all of the options it passed to gcc.
1997-04-15 04:39:58 +00:00
Fergus Henderson
c49f69398a Fix a problem on Windows reported by Dominique de Waleffe.
Estimated hours taken: 0.25

Fix a problem on Windows reported by Dominique de Waleffe.

scripts/mercury_update_interface.in:
	Delete the hard-coded setting of `PATH=/bin:/usr/bin'.

	The original intent was to avoid problems with people who have
	done things like putting shell scripts that override the
	standard commands such as `mv' and `cp' in their path.
	However, since we haven't done this consistently for all of our
	shell scripts, and since this causes problems for Windows
	installations (for which the binaries might not be in /bin
	or /usr/bin), it seems simplest to just remove it.

	If we run into any problems with this, it should be put back in
	as `PATH=/bin:/usr/bin:$PATH' rather than `PATH=/bin:/usr/bin',
	and it should be done consistently for all shell scripts, not just
	this one.
1997-03-18 16:03:42 +00:00
Tyson Dowd
a38d265a7f Use EXTRA_* environment variables for setting flags.
Estimated hours taken: 2

Use EXTRA_* environment variables for setting flags.

doc/user_guide.texi:
	Document that EXTRA_* variables can be used for setting flags
	when mmake is being used. Document the commonly used mmake
	variables.

scripts/Mmake.vars.in:
	Set *FLAGS variables according to EXTRA_*FLAGS.
1997-03-18 05:58:16 +00:00
Fergus Henderson
59cf271af1 Undo my previous change to use `exec', since that causes
Estimated hours taken: 0.25

scripts/mmake.in:
	Undo my previous change to use `exec', since that causes
	problems because the temporary files never get removed.
	Instead, I've just added a comment saying why `exec' can't
	be used.
1997-02-27 15:32:29 +00:00
Fergus Henderson
f25b679f39 Allow `*-cygwin32' as a another name for Windows running gnu-win32,
Estimated hours taken: 0.1

scripts/ml.in:
	Allow `*-cygwin32' as a another name for Windows running gnu-win32,
	since that is the name that `config.guess' outputs.
1997-02-26 14:43:48 +00:00
Fergus Henderson
da41b23096 Change the code so that it uses `exec' to run make,
Estimated hours taken: 0.25

scripts/mmake.in:
	Change the code so that it uses `exec' to run make,
	rather than just invoking it as a sub-process.  This
	should be a little more efficient.
1997-02-26 09:25:54 +00:00
Fergus Henderson
237a4c0524 Oops, fix another bug in the handling of -shared and -static:
Estimated hours taken: 0.25

scripts/ml.in:
	Oops, fix another bug in the handling of -shared and -static:
	it wasn't actually passing them on to gcc.
1997-02-10 07:18:53 +00:00
Fergus Henderson
39441951c0 Fix a problem where the new support for Linux ELF shared libraries
in gc 4.11 meant that `ml -static' didn't work on Linux, because
you got unresolved references to _DYNAMIC in dyn_load.o.

scripts/ml.in:
	If we're passed `-static' or `--static', then pass
	`-static -Wl,-defsym,_DYNAMIC=0' to gcc, so that gcc
	will pass `-defsym _DYNAMIC=0' to the linker.
1997-02-09 12:26:57 +00:00
Fergus Henderson
cc813fbac2 Fix a bug in the code to parse the new -static, --static, -shared and
Estimated hours taken: 0.25

scripts/ml.in:
	Fix a bug in the code to parse the new -static, --static, -shared and
	--shared options: add in some missing `shift' statements.
1997-02-09 11:20:02 +00:00
Fergus Henderson
186f71464e Add a tiny bit more documentation.
Estimated hours taken: 0.1

scripts/mmake.in:
	Add a tiny bit more documentation.
1997-02-09 03:50:43 +00:00
Fergus Henderson
1d3043d497 Make a couple of changes to the help message, as suggested
Estimated hours taken: 0.25

scripts/ml.in:
	Make a couple of changes to the help message, as suggested
	by Tyson.
1997-02-09 02:59:34 +00:00
Fergus Henderson
8ce103cc76 Add Unix-style man pages for most of the Mercury development tools.
scripts/c2init.in:
scripts/mmake.in:
scripts/msc.in:
	Small changes to the help messages to make them come out
	better when converted to man pages.

scripts/mgnuc.in:
	Add a `--help' option.
1997-02-07 14:17:41 +00:00
Fergus Henderson
ac041e1f8a Some work towards making it easier to use shared libraries on Linux.
Estimated hours taken: 1

Some work towards making it easier to use shared libraries on Linux.

scripts/ml.in:
	Add a `--mercury-libs {shared, static, none}' option
	(`--mercury-libs none' replaces the old `--no-libs' option).
	Add `--shared' and `--static' options.
	Add a `--help' option.
1997-02-07 13:46:06 +00:00
Fergus Henderson
3e0f071867 Add a rule for creating `.pic_s' files (which are the
Estimated hours taken: 0.25

scripts/Mmake.rules:
	Add a rule for creating `.pic_s' files (which are the
	assembler files corresponding to the `.pic_o' objects).
1997-02-07 13:21:01 +00:00
Fergus Henderson
726b1e24d2 Change the default compile mode from fastcode' to compactcode',
Estimated hours taken: 0.25

scripts/msc.in:
	Change the default compile mode from `fastcode' to `compactcode',
	because the SICStus 2.1#9 native code generator for Sparc
	has some bugs in it.
1997-02-05 05:58:43 +00:00
Fergus Henderson
a3aa0897f9 One of several changes to add support for ELF shared libraries on Linux.
Estimated hours taken: 0.5

One of several changes to add support for ELF shared libraries on Linux.

scripts/ml.in:
	For i?86-*-linux*, pass the appropriate flags to the linker to
	link in shared libraries, if there are any.

#endif
1997-02-05 05:40:41 +00:00
Fergus Henderson
d14bdd2eee More stuff to support non-Mercury main() programs.
Estimated hours taken: 0.5

More stuff to support non-Mercury main() programs.

util/c2init.c:
	Implement a new `-l' / `--libary' option.
	If this option is enabled, we pass `-l' to mkinit,
	which has the end result that we don't emit a main(),
	but instead we emit a mercury_main(argc, argv, stack_bottom)
	function that can be called from C.
1997-02-01 00:12:06 +00:00
Fergus Henderson
d9f1226e91 If using gcc 2.6.3 on mips, compile library/bag.c with `-O0',
Estimated hours taken: 0.5

scripts/mgnuc.in:
	If using gcc 2.6.3 on mips, compile library/bag.c with `-O0',
	to work around a gcc bug.
1997-01-16 18:41:44 +00:00
Fergus Henderson
517b2e9db7 Work around a bug in gcc 2.7.0: compile call_gen.c with `-O0'.
Estimated hours taken: 0.5

scripts/mgnuc.in:
	Work around a bug in gcc 2.7.0: compile call_gen.c with `-O0'.
1997-01-10 14:00:51 +00:00
Fergus Henderson
ae7beb4329 Update a comment.
Estimated hours taken: 0.1

scripts/mc.in:
	Update a comment.
1996-12-14 20:45:38 +00:00
Fergus Henderson
d76c09c48f Switch over to the new arg-convention and type-info representation.
scripts/mgnuc.in:
	Pass -DCOMPACT_ARGS to the C compiler.
1996-12-13 05:52:23 +00:00
Fergus Henderson
0835d8cc4e If double' is the same size as void *', then don't box floats.
Estimated hours taken: 2

If `double' is the same size as `void *', then don't box floats.

scripts/mc.in:
	Pass the configured value of @HAVE_BOXED_FLOATS@ to mercury_compile.
1996-12-13 00:02:23 +00:00
Fergus Henderson
b96891a686 Put @CC@ in quotes, so that it works in the case when someone
Estimated hours taken: 0.25

scripts/mc.in:
scripts/mgnuc.in:
scripts/ml.in:
	Put @CC@ in quotes, so that it works in the case when someone
	does `CC="gcc -some -options" configure'.  Similarly for @MKFIFO@.
1996-12-11 18:02:45 +00:00
Fergus Henderson
6b9a292e7d For gnu-win32, don't strip the executable by default, since
Estimated hours taken: 8 (to find the problem) + 0.25 (to fix it)

scripts/ml.in:
	For gnu-win32, don't strip the executable by default, since
	`gcc -s' seems to be broken on gnu-win32 for Windows NT.
1996-12-09 08:24:49 +00:00
Fergus Henderson
0d695dcd4c Add a new --emacs' (or -e') option, for creating
Estimated hours taken: 1

scripts/mtags:
	Add a new `--emacs' (or `-e') option, for creating
	emacs-style TAGS files.
1996-11-30 11:38:30 +00:00
Fergus Henderson
a3f9969bec Rename scripts/Mmake' as scripts/Mmakefile', to avoid
Estimated hours taken: 0.25

Rename `scripts/Mmake' as `scripts/Mmakefile', to avoid
a conflict with `scripts/mmake' on case-insensitive file
systems, i.e. Windows.  (The `mmake' script checks
for both Mmakefile and Mmake, so it will still find it.)
1996-11-27 06:26:08 +00:00
Fergus Henderson
dbd5a086a5 Add support for "\c" string continuation escapes.
Estimated hours taken: 1.5

scripts/sicstus_conv.in:
	Add support for "\c" string continuation escapes.
1996-11-25 08:54:06 +00:00
Simon Taylor
0460a5f78d Improvements to intermodule optimization and bug fixes.
Estimated hours taken: 2

Improvements to intermodule optimization and bug fixes.

scripts/Mmake.rules
	Stop the output of --make-optimization-interface going to the
	.err file.
1996-11-06 01:38:47 +00:00
Zoltan Somogyi
c2e602535e Use .err instead of .err2 as the file name for error messages.
Estimated hours taken: 0.1

Mmake.rules:
	Use .err instead of .err2 as the file name for error messages.
	Remove the rule for handling .pp files.
1996-11-04 06:30:10 +00:00
Zoltan Somogyi
709ff8e20c Replace --num-real-temps "$NUM_REAL_TEMPS" with --num-real-r-temps
Estimated hours taken: 0.1

mc.in:
	Replace --num-real-temps "$NUM_REAL_TEMPS" with --num-real-r-temps
	"$NUM_REAL_R_TEMPS". Since NUM_REAL_TEMPS is not defined, the old
	code was buggy (why can't sh require declarations of variables? :-)
	We now also use the more correct form of the option name.

	Before this fix, value numbering incorrectly thought that no
	temporary variables were kept in registers, and as a result it
	frequently rejected improved code fragments improperly because,
	due to this bug, its cost model said they they were too expensive.
1996-10-30 06:56:35 +00:00
Fergus Henderson
2a4d7597c7 Uncomment the definition BITS_PER_WORD=@BITS_PER_WORD@;
Estimated hours taken: 0.25

scripts/mc.in:
	Uncomment the definition BITS_PER_WORD=@BITS_PER_WORD@;
	previously this was commented out and replaced with
	BITS_PER_WORD=32 because of bugs elsewhere, but I think
	we've fixed those bugs long ago.
-
1996-10-24 22:45:21 +00:00
Simon Taylor
d3aa462819 Add suffixes, rules and options for .opt and .optdate.
Estimated hours taken: 0.5

scripts/Mmake.rules
scripts/Mmake.vars.in
        Add suffixes, rules and options for .opt and .optdate.

scripts/mercury_update_interface.in
        Work-around for a problem with parallel gmake. mc --make-interface
        was being run twice in a row on the same module. The first call
        mercury_update_interface moves module.int.tmp to module.int,
        then the second can't find module.int.tmp. The work-around is to
        ignore the exit status of the mv.
1996-09-11 08:58:17 +00:00
Fergus Henderson
e1c8643455 Ensure that the rule for `mmake realclean' removes the
Estimated hours taken: 0.5

scripts/Mmake.rules:
	Ensure that the rule for `mmake realclean' removes the
	profiling files.

	Also use `--grade' rather than `-s' (the latter is a bit cryptic).
1996-07-26 15:38:12 +00:00
Fergus Henderson
6f5b59451c Pass -Wno-uninitialized on i?86 targets, to avoid
Estimated hours taken: 0.25

scripts/mgnuc.in:
	Pass -Wno-uninitialized on i?86 targets, to avoid
	lots of spurious warnings about `stack_pointer' possibly
	used before being initialized.
1996-07-24 14:48:14 +00:00
Tyson Dowd
c3cf377058 Add handling of accurate GC grades to the scripts.
Estimated hours taken: 0.25

Add handling of accurate GC grades to the scripts.

scripts/Mmake.rules:
	Add '-s $(GRADE)' to the rule for .m.garb
	Remove obsolete .mod.mod_h rule (we don't use that mechanism anymore).
	Remove .mod_h from .SUFFIXES

scripts/mgnuc.in:
	Add .agc grade for accurate garbage collection.
1996-06-16 05:32:53 +00:00
Simon Taylor
3dad0e05f1 Module qualification of types, insts and modes.
Estimated hours taken: 0.2

Module qualification of types, insts and modes.

Added a new interface file - <module>.int3. This contains the
short interface qualified as much as possible given the information
in the current module.

When producing the .int and .int2 files for a module, the compiler uses
the information in the .int3 files of modules imported in the interface
to fully module qualify all items. The .int2 file is just a fully
qualified version of the .int3 file. The .int3 file cannot be overwritten
by the fully qualified version in the .int2 file because then mmake would
not be able to tell when the interface files that depend on that .int3
file really need updating.


scripts/Mmake.rules
scripts/Mmake.vars
Removed the rule for .int, since this is now in the .d files.
Rules and suffix entry for the .int3 and .date3 files.
1996-06-11 06:31:37 +00:00
Fergus Henderson
3561a9043d Back out Zoltan's change to pass --num-real-r-regs instead
Estimated hours taken: 0.25

scripts/mc.in:
	Back out Zoltan's change to pass --num-real-r-regs instead
	of --num-real-regs, since it prevents bootstrapping.
	We need to wait until the rest of his changes have been
	installed everywhere before recommitting this change.
1996-05-30 09:54:56 +00:00
Zoltan Somogyi
f912c586d2 Rename NUM_REAL_TEMPS to NUM_REAL_R_TEMPS, since we may want to have
Estimated hours taken: 0.1

mc.in:
	Rename NUM_REAL_TEMPS to NUM_REAL_R_TEMPS, since we may want to have
	float temps some day.
1996-05-29 10:59:08 +00:00
Fergus Henderson
d2457986f8 Check for Mmakefile' as an alternative to Mmake'.
Estimated hours taken: 0.25

scripts/mmake.in:
	Check for `Mmakefile' as an alternative to `Mmake'.
	(This change is so I can rename scripts/Mmake as Mmakefile
	to avoid a conflict with scripts/mmake on systems with
	case-insensitive file systems, e.g. Windows 95.)
1996-05-25 03:42:17 +00:00
Simon Taylor
ad1fc50105 Add `Mmake.vars' to the list of targets; without this,
Estimated hours taken: 0.5

scripts/Mmake:
	Add `Mmake.vars' to the list of targets; without this,
	it was not updating Mmake.vars when Mmake.vars.in was changed.
1996-05-21 06:04:17 +00:00
Fergus Henderson
ef170e7949 Avoid code duplication by using the value of CFLAGS_FOR_REGS
Estimated hours taken: 0.25

scripts/mgnuc.in:
	Avoid code duplication by using the value of CFLAGS_FOR_REGS
	and CFLAGS_FOR_GOTOS from configure.in rather than duplicating
	the logic to compute them here.  (There's still a small amount
	of duplication, but that is more difficult to avoid.)
1996-05-19 08:04:09 +00:00
Fergus Henderson
62377e8bf2 Fix a portability problem: ULTRIX's /bin/sh does not understand
Estimated hours taken: 0.5

scripts/{c2init,mnc,mnl,msc,msl}.in:
	Fix a portability problem: ULTRIX's /bin/sh does not understand
	`shift 2', so I've replaced all occurrences of this with
	`shift; shift'.  (Thanks to Jeff Schultz for the bug report.)
1996-05-13 06:12:48 +00:00
Fergus Henderson
d664d48d8d Always pass --bits-per-word 32, since for some reason
Estimated hours taken: 0.1
	Plus lots of debugging time

scripts/mc.in
	Always pass --bits-per-word 32, since for some reason
	--bits-per-word 64 causes the compiler to generate incorrect
	code for lookup switches.
1996-05-05 18:55:10 +00:00
Fergus Henderson
8cb3e1292c Pass the configured value of --bytes-per-word.
Estimated hours taken: 0.25
	(plus 0.75 debugging)

scripts/mc.in:
	Pass the configured value of --bytes-per-word.
	Also fix a missing line for --bits-per-word.
1996-05-03 00:12:12 +00:00
Thomas Conway
97c09ffc3c Pass the number of bits in a word as a configured parameter
Estimated hours taken: 0.1

scripts/mc.in:
	Pass the number of bits in a word as a configured parameter
	to mercury_compile instead of using the default (32). Ports
	to 16 bit achitectures should now work ;-)
1996-05-02 22:16:20 +00:00