Commit Graph

212 Commits

Author SHA1 Message Date
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
Fergus Henderson
cb209bcc4b Remove llds.c from the list of files to fix, since it doesn't
Estimated hours taken: 0.1

scripts/rs6000_hack:
	Remove llds.c from the list of files to fix, since it doesn't
	need to be fixed, and the script barfs if it tries to split 0
	pieces off a file.  (The set of files that need to be fixed
	seems to be sensitive to the compilation options used.)
1996-05-02 18:42:05 +00:00
Fergus Henderson
783c02614e Fix a bug in, and improve the documentation of, my previous
Estimated hours taken: 0.25

scripts/mgnuc.in:
	Fix a bug in, and improve the documentation of, my previous
	change to use `-fPIC' rather than `-fpic' on solaris2 in grade none.
1996-04-27 20:21:50 +00:00
Fergus Henderson
9ccd89be98 On sparc-sun-solaris*, we need to use -fPIC' rather than -fpic'
Estimated hours taken: 0.25

scripts/mgnuc.in:
	On sparc-sun-solaris*, we need to use `-fPIC' rather than `-fpic'
	for grade `none', to avoid overflowing a fixed limit on the number
	of "small pic" references.
1996-04-26 20:08:33 +00:00
Zoltan Somogyi
27068f8d16 Rename BRANCH_DELAY_SLOT to HAVE_DELAY_SLOT.
Estimated hours taken: 0.2

mc.in:
	Rename BRANCH_DELAY_SLOT to HAVE_DELAY_SLOT.
	Set the default optimization level here, not in options.m.
1996-04-24 01:03:30 +00:00
Fergus Henderson
d8b28c7614 Generate tags for functors (constructors).
Estimated hours taken: 1

scripts/mtags:
	Generate tags for functors (constructors).
	Also, generally reorganize the code and document parts of it a
	bit better.  I also added code to warn about duplicate
	definitions, but such warnings are probably just a pain,
	so I turned them off.
1996-04-21 11:50:20 +00:00
Zoltan Somogyi
a5ed3f49c4 Transmit the --num-real-r-regs, --num-real-temps and
Estimated hours taken: 0.2

mc.in:
	Transmit the --num-real-r-regs, --num-real-temps and
	--branch-delay-slot options from autoconfiguration to mercury_compile.
1996-04-20 08:40:13 +00:00
Fergus Henderson
5bb6657116 Change the rules for building `.pic_o' to avoid some problems
Estimated hours taken: 2

scripts/Mmake.rules:
	Change the rules for building `.pic_o' to avoid some problems
	with parallel makes.  In particular, the stuff for removing
	the intermediate `.c' files was causing some trouble.
1996-04-18 01:18:59 +00:00
Fergus Henderson
668b3d6b93 Make sure the work-arounds for gcc 2.6.x bugs are only applied
Estimated hours taken: 0.25

scripts/mgnuc.in:
	Make sure the work-arounds for gcc 2.6.x bugs are only applied
	if we're using gcc 2.6.x.
1996-04-15 10:38:42 +00:00
Fergus Henderson
2cc215064f Handle `:- func' declarations.
Estimated hours taken: 0.25

scripts/mtags:
	Handle `:- func' declarations.
1996-04-15 08:41:35 +00:00
Fergus Henderson
9aa364262c Remove `hlds.c' from the list of big files to split, since
Estimated hours taken: 0.1

scripts/rs6000_hack:
	Remove `hlds.c' from the list of big files to split, since
	we've split hlds.m now anyway.
1996-04-11 17:00:02 +00:00
Fergus Henderson
94a3c99f4d Add a script to work around fixed limits in the RS/6000 object
Estimated hours taken: 1

scripts/rs6000_hack:
	Add a script to work around fixed limits in the RS/6000 object
	file format by chopping up large C files into smaller pieces.
1996-04-11 14:04:28 +00:00
Fergus Henderson
1198573324 Fix a security problem with the use of `chmod +w'.
Estimated hours taken: 0.5

Fix a security problem with the use of `chmod +w'.

{scripts,runtime}/Mmake:
	Use `chmod u+w' rather than `chmod +w' on the installed files,
	since `chmod +w' has the wrong effect with some versions of chmod.
	When configure creates automatically-generated files, we do a
	`chmod -w' on them to make sure that you don't accidentally edit
	the automatically-generated file rather than the source `.in' file.
	However, if the installed copies are write-only, then it causes
	problems when installing a new copy on top of an old one.
	Hence we turn write permission back on again on the installed copies.
	The `chmod +w' command has the right effect on Solaris, OSF/1, and
	SunOS, where it takes into account the umask.  However, on IRIX and
	ULTRIX, `chmod +w' does not take the umask into account, and so
	makes the files world-writable, which is a security problem.
	Hence, we now use `chmod u+w' instead.
1996-04-10 09:26:11 +00:00
Fergus Henderson
b6960ffa39 Add another work-around for a gcc-2.6.3 bug, this time to avoid
Estimated hours taken: 0.25

scripts/mgnuc.in:
	Add another work-around for a gcc-2.6.3 bug, this time to avoid
	a gcc abort when compiling compiler/modules.c with -O2 on the
	alpha.  Note that this bug only seems to be triggered if
	modules.m is compiled with mc -O3 (i.e. with value numbering
	enabled), which is why it wasn't encountered before.
	The problem does not occur with gcc-2.7.2, but we should leave
	the work-around in so that people who only have gcc-2.6.3 can
	install the system.
1996-04-09 16:03:16 +00:00
Fergus Henderson
2e7833b1ea Fix a problem detected by the auto-test script on munta.
Estimated hours taken: 0.25

Fix a problem detected by the auto-test script on munta.

scripts/mgnuc.in:
	The work-around for the gcc-2.6.3 bug on mips in which
	it reports an internal error when compiling `int.c' with -O2,
	where the mgnuc script checks for the name `int.c' and if so
	uses -O1 rather than -O2, did not succeed the library was
	compiled with --split-c-files, because the file on which gcc
	died was now named `int.dir/int_002.c'.  I've fixed the
	mgnuc script to check for `int.dir/int_*.c' as well as `int.c'.
1996-04-09 13:59:42 +00:00
Fergus Henderson
a158626828 Fix some software rot in the rule for creating `.pic_o' files.
Estimated hours taken: 0.1

scripts/Mmake.rules:
	Fix some software rot in the rule for creating `.pic_o' files.
1996-04-06 17:51:14 +00:00
Fergus Henderson
bb7563554d Fix typo that resulted in a spurious warning when using compilers
Estimated hours taken: 0.1

scripts/mgnuc.in:
	Fix typo that resulted in a spurious warning when using compilers
	other than gcc.
1996-03-31 13:37:33 +00:00
David Jeffery
4e08aed48b Mercurial Constraints III (the happy ending)
Estimated hours taken: 1 summer studentship

scripts/ml.in:
	Handle the new set of grades (*.cnstr).
scripts/mgnuc.in:
	Pass -DCONSTRAINTS if the grade is *.cnstr
1996-03-26 16:56:29 +00:00
Fergus Henderson
5310271831 Add a comment saying that changes here may also require
Estimated hours taken: 0.1

scripts/mgnuc.in:
	Add a comment saying that changes here may also require
	changes to compiler/mercury_compile.pp.
1996-03-25 07:17:50 +00:00
Zoltan Somogyi
26aaadbf64 Changes to make mtags create entries for parenthesized names,
Estimated hours taken: 0.1

scripts/mtags:
	Changes to make mtags create entries for parenthesized names,
	as in

	:- type (mode) --> ...
1996-03-23 06:20:12 +00:00
Fergus Henderson
9a03fa9315 In the rule for compiling with --split-c-files, make sure that
Estimated hours taken: 0.1

scripts/Mmake.rules:
	In the rule for compiling with --split-c-files, make sure that
	we remove the old object files before we recompile.  This is
	necessary in case you removed some predicates from the source
	file, in which case there will be fewer object files produced --
	we need to make sure that we don't leave old ones lying around.
1996-03-17 04:52:10 +00:00
Fergus Henderson
16bf987b6c Add new variables MCS and MCSFLAGS, for compiling with --split-c-files.
scripts/{Mmake.vars.in,Mmake.rules} {compiler,library,profiler}/Mmake:
	Add new variables MCS and MCSFLAGS, for compiling with --split-c-files.
1996-03-12 03:09:03 +00:00
Fergus Henderson
57987a0f6b Fix typo in rule for using --split-c-files' (it had --split-files').
Estimated hours taken: 0.1

scripts/Mmake.rules:
	Fix typo in rule for using `--split-c-files' (it had `--split-files').
1996-03-10 01:10:55 +00:00
Fergus Henderson
9716b33379 Add rule for creating %.dir/*.o using `--split-c-files'.
Estimated hours taken: 0.1

scripts/Mmake.rules:
	Add rule for creating %.dir/*.o using `--split-c-files'.
1996-03-05 15:17:44 +00:00
Fergus Henderson
21c2571659 Add `--split-c-files' option to mgnuc, which just passes
Estimated hours taken: 0.25

scripts/mgnuc.in:
	Add `--split-c-files' option to mgnuc, which just passes
	`-DSPLIT_C_FILES' to the C compiler.
1996-03-05 03:39:18 +00:00
Fergus Henderson
1f81331f9c Avoid the use of `unset', since that doesn't work for ULTRIX's /bin/sh.
Estimated hours taken: 0.5

scripts/{mnc,msc}.in:
	Avoid the use of `unset', since that doesn't work for ULTRIX's /bin/sh.
1996-03-03 22:30:00 +00:00
Fergus Henderson
d8c7b37aea Fix bug reported by Peter Szeredi which meant that SICStus debugging
Estimated hours taken: 0.25

Fix bug reported by Peter Szeredi which meant that SICStus debugging
didn't work.

scripts/msl.in:
	Don't link with portray.ql, since that is already part of
	library.sicstus.debug.
1996-02-29 07:14:39 +00:00
Fergus Henderson
acb427b669 Fix a bug reported by Dominique de Waleffe:
rename `libgc.prof.{a,so}' as `libgc_prof.{a,so}',
because SunOS 4.1.3 doesn't seem to like library names with `.' in them.

scripts/ml.in:
	Link with -lgc_prof rather than -lgc.prof for `.prof' grades.
1996-02-16 03:21:04 +00:00
Fergus Henderson
66811f0f6c Undo previous change to compile parser.c' with -O0', since we
Estimated hours taken: 0.1

scripts/mgnuc.in:
	Undo previous change to compile `parser.c' with `-O0', since we
	now have a better work-around.
1996-02-12 08:56:48 +00:00
Fergus Henderson
1d6e64ef11 Remove these files, since they're no longer needed.
Estimated hours taken: 0.1

scripts/*.sedscript:
	Remove these files, since they're no longer needed.
1996-02-04 12:50:49 +00:00
Fergus Henderson
38a2c6367f In the rule for `mmake install', make sure we remove the installed
Estimated hours taken: 0.1

scripts/Mmake:
	In the rule for `mmake install', make sure we remove the installed
	copy of `Mmake.vars' before copying over the new one, since it is
	create without write permissions.
1996-02-04 12:18:03 +00:00
Fergus Henderson
14ffa5fcd0 Ensure that mmake does not attempt to remake the `.c' file if it is up-to-date.
Estimated hours taken: 1

Ensure that mmake does not attempt to remake the `.c' file if it is up-to-date.
(This change should hopefully fix a problem with the source distribution not
being able to bootstrap itself.)

Also a couple of minor tidy-ups.

scripts/mmake.in:
	Export new variable MMAKE_MAKE_CMD, for use by Mmake.rules.

scripts/Mmake.rules:
	In the rule for `.m' -> `.o', use a recursive invocatino of
	make (via the MMAKE_MAKE_CMD variable) to build the `.c' file,
	rather than unconditionally invoking `$(MCG)'.

scripts/.cvsignore:
	Add Mmake.vars, since it is now automatically-generated.

scripts/ml.in:
	Some stylistic changes: make sure that autoconf @var@ variables occur
	only in assignments to shell variables at the start of the script,
	not scattered throughout the body of the script.
1996-02-04 06:17:30 +00:00
Fergus Henderson
cac0dfe237 Undo dylan's changes in the names of some library entities,
Estimated hours taken: 1.5

Undo dylan's changes in the names of some library entities,
by applying the following sed script

	s/term_atom/term__atom/g
	s/term_string/term__string/g
	s/term_integer/term__integer/g
	s/term_float/term__float/g
	s/term_context/term__context/g
	s/term_functor/term__functor/g
	s/term_variable/term__variable/g
	s/_term__/_term_/g
	s/std_util__bool_/bool__/g

to all the `.m' and `.pp' files in the compiler and library directories.
The reason for undoing these changes was to minimize incompatibilities
with 0.4 (and besides, the changes were not a really good idea in the first
place).

I also moved `bool' from std_util.m to a separate module.
The main reason for that change is to ensure that the `__' prefix is
only used when it genuinely represents a module qualifier.
(That's what dylan's changes were trying to acheive, but `term__'
does genuinely represent a module qualifier.)

scripts/replace_library___.sed_script.m:
	Contains the above sed script.
	I added `s/_term__/_term_/g' so that it doesn't change
	`type_to_term_float' etc.
1996-02-03 18:08:09 +00:00
Fergus Henderson
a735bc4b33 Add a work-around for a gcc bug.
Estimated hours taken: 2

Add a work-around for a gcc bug.
(gcc 2.7.0 mis-compiled parser.c.)

scripts/mgnuc.in:
	Make sure we compile parser.c with -O0 if we're using gcc on a sparc.
1996-02-01 14:51:06 +00:00
Fergus Henderson
a90e5ffb24 Invoke library.sicstus.debug' rather than library.sicstus'.
Estimated hours taken: 0.1

scripts/msp.in:
	Invoke `library.sicstus.debug' rather than `library.sicstus'.
	(The only difference is that `library.sicstus' prints
	out a nice prompt.  This difference is not worth the 2M of
	disk space that `library.sicstus' occupies.)
1996-01-23 12:04:04 +00:00
Thomas Conway
83e64768d2 the assignment to VPATH was being clobbered by a misfeature
Estimated hours taken: 0.5

scripts/Mmake.vars.in:
	the assignment to VPATH was being clobbered by a misfeature
	in autoconf. Hack the line to workaround the bug.
	The misfeature in autoconf is a workaround for a bug in SUN
	make. :-(
1996-01-10 02:50:19 +00:00
Fergus Henderson
7cd8d77ce9 Add copyright notice and some comments.
Estimated hours taken: 0.25

scripts/mkfifo_using_mknod.in:
	Add copyright notice and some comments.
1996-01-09 00:24:37 +00:00
Fergus Henderson
f45e884d2c More changes for SICStus 3.
Estimated hours taken: 0.5

More changes for SICStus 3.

scripts/msl.in:
	If we're using SICStus version 3, then we need to
	turn off character escapes.
1996-01-08 08:16:57 +00:00
Thomas Conway
e7d8f4f727 Change a couple of shell/make variable names,
Estimated hours taken: 0.5

Change a couple of shell/make variable names,
and moved some configuration stuff around.

scripts/Mmake.rules Mmake.vars.in:
	Changed some variable names.
	Changed a couple of configuration things for shared libraries.
1996-01-08 06:05:36 +00:00
Fergus Henderson
85d049d6cc Fix bugs in last change.
Estimated hours taken: 0.25

scripts/mgnuc.in:
	Fix bugs in last change.
1995-12-28 10:28:18 +00:00
Fergus Henderson
de35687da5 Make sure that `mc -c' passes the correct machine- and grade-specific
Estimated hours taken: 2

Make sure that `mc -c' passes the correct machine- and grade-specific
options to the C compiler.

configure.in:
	Set CFLAGS_FOR_REGS and CFLAGS_FOR_GOTOS to any special
	gcc options required for the use of gcc global registers and gcc
	nonlocal gotos respectively.

scripts/mc.in:
	Pass the values of CFLAGS_FOR_REGS and CFLAGS_FOR_GOTOS to
	mercury_compile.

compiler/options.m:
	Add new options for passing CFLAGS_FOR_REGS and CFLAGS_FOR_GOTOS.

compiler/mercury_compile.pp:
	Pass the CFLAGS_FOR_REGS and/or CFLAGS_FOR_GOTOS to the C compiler,
	if appropriate.
1995-12-28 07:24:02 +00:00
Fergus Henderson
3c19111b41 Modify this script so that it works with compilers other than gcc.
Estimated hours taken: 1

scripts/mgnuc.in:
	Modify this script so that it works with compilers other than gcc.
1995-12-28 05:23:13 +00:00
Fergus Henderson
2cf39d9dbd Add some fixes to get it to work with SICStus version 3.
Estimated hours taken: 1

scripts/msl.in:
	Add some fixes to get it to work with SICStus version 3.
1995-12-28 04:08:26 +00:00
Dylan Shuttleworth
c15baa3537 Some scripts to change some labels of the format foo__bar to
Estimated hours taken: 10

Some scripts to change some labels of the format foo__bar to
module__foo_bar, in both the library and the compiler.  None of these
scripts are executable, and need to be run with
~fjh/bin/scripts/apply_sed_script.  The scope of files listed below is
an indication of the files affected when these scripts are run on
mercury/*/*.[mp]*.

scripts/remove____from_compiler.sedscript
	Remove instances of foo__bar from .m and .pp files in the
	compiler/ directory.

scripts/remove____from_library.sedscript
	romove instances of foo__bar from .m files in the library/
	and compiler/ directories.

scripts/replace_compiler___.sedscript
	Undo the compiler-specific changes above.

scripts/replace_library___.sedscript
	Undo the library changes in the compiler/ and library/
	directories.
1995-12-01 02:27:20 +00:00
Fergus Henderson
6aca62cff0 Change things so that in the usual case Mmake does not keep the
automatically generated `.c' files lying around.  (The aim of this
change is to cut down on disk space usage!)

scripts/Mmake.vars:
	Add `RM_C' variable to specify whether or not the `.c' files
	should be removed.

scripts/Mmake.rules:
	Add rule for creating `.o' files directly from the `.m' files,
	using $(RM_C) to delete the intermediate `.c' file.
1995-11-24 10:20:56 +00:00
Fergus Henderson
4c33b19f4c Fix bug in which mmake' would pass the same option twice to mc'.
Estimated hours taken: 0.3

Fix bug in which `mmake' would pass the same option twice to `mc'.

scripts/Mmake.rules
	When invoking `mc --make-interface', don't pass both
	$(MCFLAGS), since $(MCIFLAGS) already includes $(MCFLAGS).
1995-11-04 09:57:36 +00:00
Fergus Henderson
e6a1810247 Changed the way configuration parameters are handled so that we
can avoid bootstrapping problems.  Instead of getting configuration
paramters from `conf.m.in', they are now passed via the `mc' script.

Also renamed the `num_real_regs' option to `num_real_r_regs',
to avoid confusion with the NUM_REAL_REGS macro set in runtime/machdeps/*.h
(which has a different meaning).

scripts/mc.in:
	Pass the value of @LOW_TAG_BITS@ (as determined by the configure
	script) to mercury_compile using the --conf-low-tag-bits option,
	and pass the value of @NUM_REAL_R_REGS@ as the default value
	of the --num-real-r-regs option.
1995-11-02 07:12:07 +00:00