Commit Graph

234 Commits

Author SHA1 Message Date
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
Fergus Henderson
831dc0079c Add a rule for creating `.i' (pre-processed C) files.
scripts/Mmake.rules:
	Add a rule for creating `.i' (pre-processed C) files.
1995-10-24 07:29:21 +00:00
Fergus Henderson
48c4671a8d Make it include tags for `:- inst' definitions.
scripts/mtags.in:
	Make it include tags for `:- inst' definitions.
1995-10-24 07:25:04 +00:00
Fergus Henderson
843a7916f3 Link with -lmer -lmercury' not -lmercury -lmer'.
scripts/ml.in:
	Link with `-lmer -lmercury' not `-lmercury -lmer'.
	The order matters: libmercury references things in libmer,
	and each library is only searched once.
1995-10-24 07:13:40 +00:00
Fergus Henderson
cc7df5f519 If --debug was set, link in portray.ql (which is now useful,
scripts/msl.in:
	If --debug was set, link in portray.ql (which is now useful,
	since it displays strings properly).
1995-10-13 17:25:37 +00:00
Fergus Henderson
809a650b72 Fix missing ";;" in case statement.
scripts/mnp.in:
	Fix missing ";;" in case statement.
1995-10-09 03:50:32 +00:00
Zoltan Somogyi
908661689f Fix missing ;;s in case statement.
mprof:
	Fix missing ;;s in case statement.
1995-10-09 01:48:21 +00:00
Fergus Henderson
934553c5a5 Change the uninstall' rule so that rather than using rm -f',
Mmake:
	Change the `uninstall' rule so that rather than using `rm -f',
	it uses plain `rm' but then ignores the exit status.  If we
	encounter permission errors when doing a `mmake uninstall', the
	user should know about them.
1995-10-07 15:43:32 +00:00
Fergus Henderson
510b77d4c7 Fix a couple of errors in the new `mmake uninstall' rule.
scripts/Mmake:
	Fix a couple of errors in the new `mmake uninstall' rule.
1995-10-07 14:51:43 +00:00
Fergus Henderson
518039f177 Add `uninstall' target to Mmake file. 1995-10-07 11:24:49 +00:00
Fergus Henderson
a92d8e7ed7 Add `.cvsignore' files. 1995-10-07 07:09:54 +00:00
Fergus Henderson
7d495c7039 In `ml', use the value of $MKFIFO determined by configure;
if configure can't find `mkfifo', configure will look for `mknod',
and set MKFIFO to `mkfifo_using_mknod', which is a new script
that basically just invokes `mknod $1 p'.  Also, add a new
option --no-demangle; if this option is used, or if the system doesn't
have either `mknod' or `mkfifo', then demangling is disabled.

These changes are all because some systems (e.g. SunOS 4.1.3)
don't have `mkfifo'.
1995-10-02 16:02:05 +00:00
Fergus Henderson
c7c4a5e03f Don't hard-code /usr/contrib/lib/nonshared; instead,
scripts/{mgnuc,ml}.in:
	Don't hard-code /usr/contrib/lib/nonshared; instead,
	use the value of the environment variable
	MERCURY_NONSHARED_LIB_DIR - either its value at run time, or if
	not set the value it had when configure was run, or failing
	that, $PREFIX/lib/nonshared.
1995-10-02 09:23:29 +00:00
Fergus Henderson
15f65f5f1b If enabling fastcode fails, just continue:
scripts/msl.in:
	If enabling fastcode fails, just continue:
	SICStus Prolog doesn't support fastcode on some CPUs (e.g. i386).
1995-10-02 07:54:18 +00:00
Fergus Henderson
8cf86fd1ef Replace all uses of
scripts/*.in:
	Replace all uses of

		... "$@" ...

	with

		case $# in
			0) ... ...
			*) ... "$@" ...
		esac

	since on ULTRIX and OSF, "$@" does the wrong thing if $# is 0.
1995-09-18 07:14:09 +00:00
Fergus Henderson
1b2817b075 Work-around bug in "$@" handling in Ultrix's /bin/sh.
scripts/mmake.in:
	Work-around bug in "$@" handling in Ultrix's /bin/sh.
1995-09-13 04:02:58 +00:00
Fergus Henderson
7b362f8323 Add a work-around for gcc-2.6.3 bug on mips: compile "int.c" with -O1
scripts/mgnuc.in:
	Add a work-around for gcc-2.6.3 bug on mips: compile "int.c" with -O1
	rather than -O2.
1995-09-13 03:57:52 +00:00
Fergus Henderson
144a01ab80 For i386, make sure we turn off -fomit-frame-pointer if we're
scripts/mgnuc.in:
	For i386, make sure we turn off -fomit-frame-pointer if we're
	using global register variables.
1995-09-13 03:40:55 +00:00
Fergus Henderson
fe7506d79c Add --assemble option for invoking as' rather than gcc'.
mgnuc.in:
	Add --assemble option for invoking `as' rather than `gcc'.
1995-09-11 12:21:54 +00:00
Fergus Henderson
08d0172754 For efficiency, use shell builtins rather than calling /bin/true:
scripts/mgnuc.in:
	For efficiency, use shell builtins rather than calling /bin/true:
	use `:' rather than `true' and use `case' rather than `if'.

scripts/ml.in:
	By default, strip the executable.
	(This speeds up linking considerably on systems without
	shared libraries, and most of the time debugging information
	is not used, since gdb doesn't support Mercury yet anyway.)
	Add -g / --no-strip option to suppress stripping.
	Use `case' rather than `if', for efficiency.
1995-09-09 11:30:26 +00:00
Fergus Henderson
5f8133f60c Remove references to mcn and mcs.
scripts/Mmake:
	Remove references to mcn and mcs.
1995-09-09 00:25:53 +00:00
Fergus Henderson
80de282fd2 Remove the "--", since it is no longer needed.
mc.in, mprof.in:
	Remove the "--", since it is no longer needed.

mcn.in, mcs.in:
	These scripts are no longer necessary - use `mc' instead.
1995-09-08 03:33:53 +00:00
Fergus Henderson
75b68f104d Add support for profiling grades (*.prof).
scripts/{mgnuc,ml}.in:
	Add support for profiling grades (*.prof).
1995-09-07 20:42:33 +00:00
Fergus Henderson
f8e3d2989d Add `-lm' to the linker command line, since the Mercury library
scripts/ml.in:
	Add `-lm' to the linker command line, since the Mercury library
	now uses various math functions.
1995-09-05 01:54:24 +00:00
Fergus Henderson
d286426475 For the 386, if global register variables are enabled, then
scripts/mgnuc.in:
	For the 386, if global register variables are enabled, then
	we must pass the `-fno-builtin' option.
1995-09-03 15:33:31 +00:00
Fergus Henderson
9db453f65a Avoid embedding the pathname to the perl interpreter in the
scripts/{mod2c,mtags}:
	Avoid embedding the pathname to the perl interpreter in the
	perl executable, since there is no standard place for perl.
1995-09-03 14:36:04 +00:00
Fergus Henderson
33c0570383 Use MERCURY_NU_LIB_DIR as specified by the documentation,
scripts/mnl.in:
	Use MERCURY_NU_LIB_DIR as specified by the documentation,
	not MERCURY_LIB_DIR.  Document the -d/--debug option.

scripts/msc.in:
	Remove mention of MERCURY_SP_BUILTIN, since it wasn't used.
1995-08-19 10:32:32 +00:00
Fergus Henderson
0f0b70be9e Make the default list of library .ql files empty,
scripts/msl.in:
	Make the default list of library .ql files empty,
	rather than `cd $SPLIBDIR; echo *.ql`.  We normally
	link by loading the named .ql files into library.sicstus.debug
	which has the library .ql files pre-loaded.  The
	the .ql files don't get installed, so `*.ql' did not
	get expanded in the `cd $SPLIBDIR; echo *.ql` command -
	instead it accidentally got expanded later as *.ql in the
	current directory, which was wrong.

	Also, call garbage_collect before saving the state in the debug
	version, since this reduces the size of the executable.
	(We already did this in the non-debug version.)
1995-08-18 16:58:02 +00:00
Fergus Henderson
3ab5e9e46a Remove some old special-case stuff (if $host = kryten ...).
scripts/ml.in:
	Remove some old special-case stuff (if $host = kryten ...).

	Change it so that it uses $CC as determined by configure
	rather than hard-coding gcc.

	Use a named pipe to invoke the demangler, so that we
	return the exit status of the C compiler, not the demangler.

	Add a new option --no-libs which suppresses the linking
	in of the libraries; this is useful if you want to link
	a shared library and have the output of the linker passed
	through the demangler.

scripts/mmake.in:
	Use a new environment variable MMAKE_DIR as the location to
	look for both Mmake.vars and Mmake.rules; this is simpler than
	use the MMAKE_VARS and MMAKE_RULES environment variables.
1995-07-29 11:16:47 +00:00