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.
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.
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.
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.
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.
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.
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.)
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. :-(
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.
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.
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.
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.
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).
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.
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.
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.
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'.
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.
scripts/*.in:
Replace all uses of
... "$@" ...
with
case $# in
0) ... ...
*) ... "$@" ...
esac
since on ULTRIX and OSF, "$@" does the wrong thing if $# is 0.
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.
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.
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.)
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.