scripts/mod2init.sh:
Split the init function into bite-size pieces.
(Otherwise the new `--procs-per-c-function 1' has the
unfortunate side-effect of creating a very large
init module, since the init module calls every function,
and it is all one basic block and takes >15 minutes to compile.)
scripts/mod2init.sh, runtime/{wrapper.mod,init.h}:
Due to a bug in the Solaris linker, we need to call the GC_INIT()
macro from some statically linked part of the code.
So I've modified mod2init to add an init_gc() function to the init
file, and I've modified wrapper.mod to call it.
mod2init.sh:
Use files with any file extension in $prefix/lib/mercury/modules,
not just the *.mod files, because I'm changing them to be *.c
or *.init.
mgnuc.sh mod2c mod2init.sh:
Moved these scripts from the code directory to the scripts directory.
Changed mgnuc to use the MERCURY_C_INCL_DIR environment variable.
Changed mod2init to use MERCURY_MOD_LIB_DIR and MERCURY_MOD_LIB_MODS.
Changed ml to use MERCURY_C_LIB_DIR rather than MERCURY_CLIB_DIR.