Estimated hours taken: 1.5
Branches: main
Remove residual parts of the Aditi backend that weren't deleted the other day.
configure.in:
Mmake.common.in:
Remove support for enabling the Aditi backend.
runtime/mercury_aditi.h:
Remove this file.
runtime/Mmakefile:
runtime/mercury.h:
runtime/mercury_imp.h:
runtime/mercury_ho_call.[ch]:
runtime/mercury_wrapper.[ch]:
Delete support for Aditi in the runtime.
scripts/Mmake.rules:
scripts/Mmake.vars.in:
scripts/c2init.in:
scripts/parse_ml_options.sh-subr.in:
Remove mmake support for building .rlo files, etc.
util/mkinit.c:
Remove Aditi specific code.
compiler/bytecode_data.m:
compiler/closure_analysis.m:
compiler/code_model.m:
compiler/compile_target_code.m:
compiler/det_analysis.m:
compiler/handle_options.m:
compiler/hlds_goal.m:
compiler/hlds_module.m:
compiler/make.dependencies.m:
compiler/make.m:
compiler/make.module_target.m:
compiler/make.program_target.m:
compiler/make.util.m:
compiler/make_hlds_error.m:
compiler/make_hlds_passes.m:
compiler/mercury_to_mercury.m:
compiler/mlds_to_gcc.m:
compiler/modecheck_call.m:
compiler/modules.m:
compiler/opt_debug.m:
compiler/options.m:
compiler/prog_data.m:
compiler/prog_foreign.m:
compiler/prog_mode.m:
compiler/prog_type.m:
compiler/rtti.m:
compiler/rtti_out.m:
compiler/rtti_to_mlds.m:
compiler/term_errors.m:
compiler/unify_proc.m:
mdbcomp/prim_data.m:
Remove residual support for Aditi.
library/ops.m:
Remove the 'aditi_bottom_up' and 'aditi_top_down' operators from the
ops table.
doc/reference_manual.texi:
doc/user_guide.texi:
Delete the sections on the Aditi interface.
extras/aditi/*:
Delete this.
Estimated hours taken: 1
Branches: main
Remove support for the --split-c-files option, since it hasn't worked in a
while, we haven't wanted to use it in a while, and the tradeoff of greatly
increased compilation time for a ~10% space gain is an increasingly bad one.
compiler/options.m:
doc/user_guide.texi:
Remove the option.
NEWS:
Mention the removal of the option.
compiler/modules.m:
Remove the references to .split executables and archives from the
generated .d files.
compiler/*.m:
Delete the code for handling --split-c-files=yes, and make whatever
simplifications this makes possible.
scripts/Mmake.*:
Remove the references to .split executables and archives.
scripts/mgnuc.in:
scripts/mgnuc_file_opts.sh-subr:
Remove the references to the --split-c-files option.
tests/hard_coded/split_c_files.{m,split.exp}:
tests/hard_coded/mapped_module.split.exp:
Delete the test cases testing the deleted functionality.
tests/hard_coded/Mmakefile:
Don't test split C files.
Estimated hours taken: 4
Branches: main
Reduce the amount of clutter on mgnuc command lines by moving arguments that
are always the same for a given directory into a file that is always consulted
by mgnuc in the current directory.
scripts/mgnuc.in:
Always include as C compiler arguments the contents of a file named
.mgnuc_copts in the current directory, if it exists. (It is named
.mgnuc_copts instead of .mgnuc_opts because it may not contain
general mgnuc options, such as --no-mercury-stdlib-dir.)
Mmake.workspace:
Comment out the additions of search paths to CFLAGS.
*/Mmakefile:
Delete the additions of search paths to CFLAGS.
*/.mgnuc_copts:
New files containing the directory-specific search paths, and in some
cases the required macro definitions. These replace what was taken out
of Mmake.workspace and */Mmakefile. In some cases, the old search paths
included inappropriate directories; the .mgnuc_copt files don't.
tests/.mgnuc_copts.ws:
New files containing the directory-specific search paths; bootcheck
makes tests/.mgnuc_copts from it.
*/.nocopyright:
Don't require copyright notices in .mgnuc_copts files.
tools/bootcheck:
Copy the various .mgnuc_copts files from the stage1 to stages 2 and 3.
They aren't needed in stage3 right now, but that may change.
Create tests/.mgnuc_copts.
browser/util.m:
Delete an unused and inappropriate #include.
scripts/Mmake.rules:
Use a single invocation of mkdir -p to create all subdirectories
needed by Java. Update a piece of documentation.
scripts/Mmakefile:
Reorganize the process of invoking config.status to avoid invoking
it on inappropriate files, and to ensure the right permissions
on the files it is invoked on.
scripts/prepare_tmp_dir_grade_part:
Copy the .mgnuc_copts files when populating tmp_dir.
Estimated hours taken: 12
Branches: main
Move the mdbcomp library to its own directory. To make this change less painful
to test, improve the way we handle installs.
browser/mdbcomp.m:
browser/mer_mdbcomp.m:
browser/prim_data.m:
browser/program_representation.m:
browser/trace_counts.m:
Move these files to the mdbcomp directory.
browser/Mmakefile:
browser/Mercury.options:
mdbcomp/Mmakefile:
mdbcomp/Mercury.options:
Split the contents of the old Mmakefile and Mercury.options file
in the browser directory between these files as appropriate.
Simplify away the stuff not needed now that there is only one library
per directory. Make the browser directory see the relevant files
from the mdbcomp directory.
Mmake.common.in:
Separate out the prefixes allowed in the browser and the mdbcomp
directories.
Mmake.workspace:
Set up a make variable to refer to the mdbcomp directory.
Adjust references to the mdbcomp library to point to its new location.
Mmakefile:
Make invocations visit the mdbcomp library as necessary.
Improve the way we install grades. Making temporary backups of the
directories modified by the install process is unsatisfactory for two
reasons. First, if the install fails, the cleanup script, which is
necessary for user friendliness, destroys any evidence of the cause.
Second, the restore of the backup wasn't perfect, e.g. it left the
.d files modified to depend on .mih files, which don't exist in
LLDS grades, and also left altered timestamps.
This diff changes the install process to make a single tmp_dir
subdirectory of the workspace, with all the work of install_grade
being done inside tmp_dir. The original directories aren't touched
at all.
*/Mmakefile:
Adjust references to the browser directory to refer to the mdbcomp
directory instead or as well.
scripts/Mmake.rules:
*/Mmakefile:
Make it easier to debug Mmakefiles. Previously, creating a
Mmake.makefile with mmake -s and invoking "make -d" ignored the
most fundamental rules of mmake, because Mmake.rules was treating
an unset MMAKE_USE_MMC_MAKE as if it were set to "yes", simply because
it was different from "no". This diff changes it to treat an unset
MMAKE_USE_MMC_MAKE as if it were set to "no", which is a more
sensible default.
scripts/prepare_tmp_dir_fixed_part.in:
scripts/scripts/prepare_tmp_dir_grade_part:
Two new scripts that each do half the work of preparing tmp_dir for
the real work of the install_grade make target. The fixed_part script
prepares the parts of tmp_dir that are grade-independent, while the
grade_part scripts prepares the parts that are grade-dependent.
configure.in:
Test C files in the mdbcomp directory to see whether they need to
be recompiled after reconfiguration.
Create prepare_tmp_dir_fixed_part from prepare_tmp_dir_fixed_part.in.
compiler/*.m:
runtime/mercury_wrapper.c:
Update the references to the moved files.
compiler/notes/overall_design.html:
Mention the new directory.
Estimated hours taken: 0.25
Branches: main
compiler/modules.m:
Always pass ALL_GRADEFLAGS to mmc, even when building the
interface files. This avoids spurious "debugging is
available only in low-level C grades" errors when
the default grade is hlc.gc.
Zoltan did this for scripts/Mmake.rules but not modules.m.
scripts/Mmake.rules:
Pass ALL_GRADEFLAGS when errorchecking and converting to Mercury.
Estimated hours taken: 0.5
Branches: main
Clean up the handling of environment variables.
scripts/Mmake.rules:
scripts/c2init.in:
scripts/mgnuc.in:
scripts/ml.in:
scripts/mmc.in:
scripts/parse_ml_options.sh-subr.in:
scripts/binary_step.in:
Remove support for the environment variables which were
previously used to override the location of the standard
library (MERCURY_ALL_C_INCL_DIRS, MERCURY_ALL_MC_C_INCL_DIRS,
MERCURY_INT_DIR, MERCURY_C_LIB_DIR, MERCURY_MOD_LIB_MODS,
MERCURY_TRACE_LIB_MODS).
scripts/Mercury.config.in:
Fix syntax errors.
Set the DEFAULT_MERCURY_LINKAGE variable here rather
than in the mmc script.
scripts/mmc.in:
Setting DEFAULT_MCFLAGS is no longer required -- mmc
now reads its configuration information from the
Mercury.config file. This also fixes a bug which
caused failures in the `mmc --make' tests in
debugging grades on mundroo -- `mmc --make' wasn't
including /usr/local/lib and /usr/local/include in
the search paths for libraries and headers.
configure.in:
Check that the installed compiler is capable of
reading the Mercury.config file.
Bootstrap tag: bootstrap_20030413_read_config_file.
NEWS:
doc/user_guide.texi:
Document the change.
Estimated hours taken: 0.2
Branches: main
scripts/Mmake.rules:
Pass $(ALL_GRADEFLAGS) to all invocations of the compiler, since
the compiler now has sanity checks on option values that could be
tripped with the default grade that may not be tripped with the actual
desired grade.
library/Mmakefile:
Delete my previous "fix" for this problem, since it is not needed
anymore.
Estimated hours taken: 3
Branches: main
Make sure the Java back-end puts class files in the right place with
`--use-subdirs' and properly cleans up all generated .class files.
mercury/compiler/compile_target_code.m:
mercury/scripts/Mmake.rules:
Tell to Java compiler to put generated .class files in the
`Mercury/classs' directory.
mercury/compiler/modules.m:
Clean up all generated .class files.
Estimated hours taken: 1
Branches: main, release
scripts/Mmake.rules:
compiler/compile_target_code.m:
Be consistent about using `-' rather than `/' for options to cl.
Use `-o ' rather than `-link -out:'.
Ensure that `-o' comes before $(MS_CL_LIBS).
Resynchronize the release branch with the main branch.
Estimated hours taken: 0.5
Branches: main
Fix a bug in my previous change to fix a bug in fjh's previous change.
Revert back to using '/out:', and instead add the flag '/link' so that '/out:'
is passed to the linker instead to avoid problems compiling the library.
scripts/Mmake.rules:
compiler/compile_target_code.m:
Add '/link' before the '/out:'.
scripts/Mmake.rules:
Also add fjh's change for /LD to other rules building .dlls.
Estimated hours taken: 0.5
Branches: main
Fix a bug in fjh's previous change where we are passing the linker
flag for naming the output file to the C compiler, not the C compiler
flag.
scripts/Mmake.rules:
'-o' is the flag for naming the output file for the C compiler.
Estimated hours taken: 0.5
Branches: main
scripts/Mmake.rules:
When invoking $(MS_CL) to create DLLs, use the option "/LD" which
is documented in the help message, rather than the (undocumented?)
options "-link -noentry mscoree.lib -dll".
Estimated hours taken: 3
Branches: main
Fix a bug where `mercury.dll' was not being found by the C# compiler.
when you configured with a non-MS C compiler. This bug broke
tests/hard_coded/foreign_type in grade il.
configure.in:
bindist/bindist.build_vars.in:
Rename CYGPATH as FIX_PATH_FOR_CC.
scripts/Mmake.vars.in:
Rename CYGPATH as FIX_PATH_FOR_CC,
and add new variables FIX_PATH_FOR_CL and FIX_PATH_FOR_CSC.
The new variables are currently hard-wired as `cygpath -w',
since currently we only support the MS versions of CL and CSC.
Also, change the definition of MERC_DLL_DIR to use $(GRADE)
rather than hard-coding "ilc".
scripts/Mmake.rules:
Use the new variables, rather than $(CYGPATH).
Also, update various comments, and delete the unnecessary version
number from the MS_VC7_INCLUDES_DIR and MS_VC7_INCLUDES variable
names.
scripts/ml.in:
Use @FIX_PATH_FOR_CC@ rather than @CYGPATH@.
Estimated hours taken: 0.75
Branches: main
scripts/Mmake.rules:
boehm_gc/Mmakefile:
runtime/Mmakefile:
library/Mmakefile:
trace/Mmakefile:
Run $(RANLIB) on the installed libraries.
This is needed on MacOS 10.1, where the linker checks the date
stamp on the .a file, refusing to link if this date is greater
than the date when ranlib was run. Since installing the
libraries with `cp' updates their timestamp, we need to rerun ranlib.
scripts/Mmake.rules:
Change some hard-coded occurrences of `.a' to `.$A'. This is
probably needed to make things work properly when building with MSVC.
Estimated hours taken: 1
Branches: main
Change things so that LIBGRADES includes the default grade.
This fixes a bug that sometimes caused the libraries not to be
installed in the default grade, e.g. when $(GRADE) is set in Mmake.params.
configure.in:
Don't delete $(GRADE) from $(LIBGRADES).
Mmakefile:
scripts/Mmake.rules:
compiler/make.program_target.m:
Change the loops over $(ALL_LIBGRADES) so that they skip $(GRADE).
scripts/Mmake.vars.in:
Delete an bogus assignment setting LIBGRADES to empty, since it
wasn't being used (LIBGRADES was being assigned again below).
Update the documentation for LIBGRADES.
Branches: main
Estimated hours taken: 0.25
scripts/Mmake.rules:
scripts/Mmake.vars.in:
Define ERR_REDIRECT in Mmake.vars.in, rather than Mmake.rules,
so that it can be overridden by the user's Mmakefile.
Branches: main
Estimated hours taken: 1
scripts/Mmake.rules:
Make the redirection of errors into `.err' files configurable,
by abstracting out the code to redirect errors into a variable
ERR_REDIRECT. By default the behaviour remains the same, but if
you run `mmake ERR_REDIRECT=', then errors will not be redirected.
Estimated hours taken: 10
Branches: main
In the presence of foreign code the `.opt' and `.trans_opt' files
aren't grade independent, so install them in grade-dependent
directories.
scripts/Mmake.vars.in:
Define $(INSTALL_GRADE_INT_DIR), which holds `.opt'
and `.trans_opt' files.
Pass the extra libraries to mmc using `--ml' and `--mld'
(`--mercury-library' and `--mercury-library-directory')
options, rather than just a `-I' option. This is needed
so that $(INSTALL_GRADE_INT_DIR) is searched for `.opt'
files before $(INSTALL_INT_DIR)
Fix a bug -- the `-I' options for libraries should
go in CFLAGS, not MGNUCFLAGS.
scripts/Mmake.rules:
Create INSTALL_GRADE_INT_DIR in the install_grade_dirs target.
compiler/modules.m:
Install `.opt' and `.trans_opt' files in $(INSTALL_GRADE_INT_DIR).
`.int0' files are needed by `.opt' files for sub-modules, so
install them.
<module>.int0s now only contains the names of modules with sub-modules
(this is needed to avoid attempting to install nonexistent `.int0'
files).
compiler/handle_options.m:
Add $(INSTALL_GRADE_INT_DIR) for each `--mercury-library' option
to `--intermod-directories'.
Mmakefile:
scripts/Mmake.vars.in:
scripts/Mmake.rules:
Simplify the code to copy/remove the grade dependent files
before building the libraries in a new grade when installing.
Copy/remove all grade-dependent files, including `.opt' files
and `.dv' files.
Estimated hours taken: 10
Branches: main
Library installation with `mmc --make'.
compiler/make.m:
compiler/make.program_target.m:
Handle `mmc --make lib<module>.install'.
compiler/options.m:
Add an option `--use-grade-subdirs', which causes
all grade-dependenent files to be placed in
`Mercury/<grade>/<ext>s' subdirectories, even
those files that are intended for use by the user.
`--use-grade-subdirs' is not documented because it
is only intended for use in library installation
with `mmc --make' (it doesn't work at all with Mmake).
Documenting it would require documenting (and setting
in stone) the layout of the `Mercury' directory, which
is probably a bad idea.
Mmake.workspace:
compiler/handle_options.m:
scripts/Mmake.rules:
Header files are now always searched for using the plain
file name (not Mercury/mihs/module.mih), so add a
`--c-include-directory' option to search Mercury/mihs
in the current directory.
compiler/modules.m:
compiler/intermod.m:
compiler/make.module_dep_file.m:
compiler/mercury_compile.m:
compiler/mlds_to_c.m:
compiler/trans_opt.m:
Handle `--use-grade-subdirs' in module_name_to_file_name.
Add module_name_to_search_file_name, which should be
used to generate the names of files that might be part
of an installed library. This is needed because installation
and local directory hierarchies have a different layout,
A better long-term fix would be to change things so that
the installation and local directory layouts are the same.
compiler/make.util.m:
compiler/make.dependencies.m:
compiler/make.module_target.m:
Add an extra argument to get_target_timestamp and
get_file_name to specify whether the file should
be searched for.
compiler/options_file.m:
scripts/Mmake.vars.in:
Handle the LIBGRADES and INSTALL_PREFIX make variables.
doc/user_guide.texi:
Remove the statement that library installation is
not supported with `mmc --make'.
Estimated hours taken: 0.2
Branches: main
scripts/Mmake.rules:
compiler/modules.m:
In the presence of foreign code the `.opt' and `.trans_opt' files
aren't grade independent, so pass $(ALL_GRADEFLAGS) to mmc
when creating them.
Estimated hours taken: 1.5
Branches: main
My change to fix the handling of target specific MCFLAGS
variables didn't work with `--split-c-files'.
compiler/modules.m:
Fix some bugs in the handling of `--split-c-files':
- Make `--split-c-files' work where the module name doesn't
match the file name.
- $(MCFLAGS-module) wasn't being passed to mmc when `module.dir/*.o'
were being rebuilt (it was being passed when the files were
being built from scratch).
scripts/Mmake.rules:
The pattern rule for `%.dir/*.o' is now redundant, so remove it.
Estimated hours taken: 5
Branches: main
Allow tools/bootcheck to be run using `mmake --use-mmc-make'.
The tests don't work yet.
compiler/make.m:
compiler/make.module_target.m:
Handle targets such as `<module>.cs' and `<module>.ints',
which are used when building stage 3.
Mmake.common.in:
*/Mmakefile:
*/Mercury.options:
Add Mercury.options files to pass module-specific flags to
`mmc --make'.
Avoid triggering the .DEFAULT rule introduced with `--use-mmc-make'
for optional files like Mmake.params.
compiler/modules.m:
Build the interface files when building a library in IL grades,
for consistency with C grades.
library/Mmakefile:
Improve performance by removing the dependency on the interface
files when building the library. The files are now always built
by the libmer_std target.
Pass the command to build libmer_std.init to `mmc --make'.
tools/bootcheck:
Add an option `--use-mmc-make'.
Copy the Mercury.options files into the stage2 and stage3 directories.
scripts/Mmake.rules:
Don't include the rules for `.dep' files with `--use-mmc-make'.
Include the rule for `--convert-to-mercury' even with `--use-mmc-make'.
compiler/Mmakefile:
tools/bootcheck:
tools/binary_step:
`mmc --make' doesn't handle `<module>_init.c' targets, so
don't make the `cs' target depend on `top_level_init.c'.
As far as I can tell, that dependency is only present so
that the stage2 and stage3 compilers have the same set of
C files. bootcheck and binary_step now only compare `.c'
files which are present in the stage3 directory.
Estimated hours taken: 0.5
Branches: main
scripts/Mmake.rules:
Avoid generating interface files for the library in
the compiler directory by stripping the directory
from the module name passed to mmc.
Estimated hours taken: 0.25
Branches: main
Fix a bug in my change to generate grade dependent header files.
The `.mih' files weren't being installed for the default grade.
scripts/Mmake.rules:
Run `lib<main_module>.install_grade_hdrs' for
all grades, including the default grade.
Mmakefile:
library/Mmakefile:
libmer_std.install_grade_hdrs is now run by
libmer_std.install_library, so it doesn't
need to be explicitly invoked here.
Estimated hours taken: 25
Branches: main
Fix problems with the compiler-generated header files:
1. the header files are grade dependent, but the header files
can only be installed for one grade.
2. the generated header files can clash with system headers.
To solve these problems, the compiler now generates a
grade dependent `.mih' file containing the declarations
needed when a module is imported in a high-level C code
grade, and a grade independent `.mh' file, which contains
the prototypes for `:- pragma export' declarations.
compiler/export.m:
Generate a `.mh' rather than a `.h' file for the `:- pragma export'
declarations.
Allow the header file generated by export.m to be used with
`--high-level-code'.
compiler/modules.m:
library/Mmakefile:
Add a module.install_grade_hdrs target to install the `.mih'
files in a grade-dependent directory.
compiler/arg_info.m:
compiler/hlds_out.m:
compiler/hlds_pred.m:
Make it easier to tell if the arg_info field of the proc_info
has been set.
compiler/mlds_to_c.m:
Include both the `.mh' and `.mih' files for imported modules.
The type used as the return value for a semidet procedure
exported to C is `MR_bool', not `MR_Word'.
compiler/mlds_to_c.m:
compiler/modules.m:
Don't add a `mercury.' prefix to the standard library
header file names. They can't clash with the system
headers any more.
compiler/mercury_compile.m:
compiler/mlds_to_c.m:
Use export.m to generate the header file for `:- pragma export'
declarations even in hlc grades.
compiler/mlds.m:
compiler/ml*.m:
Distinguish between the `.mh' and `.mih' files
in `mlds__import's.
compiler/handle_options.m:
scripts/Mmake.vars.in:
scripts/mgnuc.in:
Add C include directory options for the installed grade
dependent `.mih' files.
Mmakefile:
scripts/Mmake.rules:
s/h/mih/ in the commands to save the grade dependent
files when installing the library grades.
compiler/make.m:
compiler/make.dependencies.m:
compiler/make.module_target.m:
compiler/make.util.m:
Handle dependencies on `.mh' and `.mih' files.
NEWS:
doc/user_guide.texi:
Document the change.
Estimated hours taken: 5
Branches: main
More changes to make `mmc --make' work with mmake.
scripts/Mmake.vars.in:
Pass MCFLAGS, CFLAGS, MLFLAGS, etc. to mmc in an options file
on standard input.
Don't add options for EXTRA_LIBRARIES to CFLAGS and MLFLAGS
when compiling with `mmc --make'. mmc handles those options
itself.
compiler/options.m:
compiler/options_file.m:
doc/user_guide.texi:
`--options-file -' now makes the compiler read an options
file from standard input.
Make `--options-file' behave as a standard accumulating option
rather than attempting to copy the behaviour of make's `-f' option.
s/--link_object/--link-object/
Mmake.workspace:
Put the `.a' files for the libraries in MLOBJS, not MLLIBS.
`mmc --make' will now relink when they change.
compiler/modules.m:
Link MLOBS into `module.split'.
tests/debugger/Mmakefile:
Create a Mercury.options file for use in compiling
the queries in interactive.m test.
Estimated hours taken: 0.1
Branches: main
scripts/mmake.in:
scripts/Mmake.vars.in:
scripts/Mmake.rules:
s/MC_MAKE_FILES/MC_BUILD_FILES/ as suggested by rafe.
Estimated hours taken: 2.5
Branches: main
Allow `mmc --make' to be used with Mmake.
scripts/mmake.in:
Add an option `--use-mmc-make', which tells mmake
to use `mmc --make' to build Mercury targets.
scripts/Mmake.vars.in:
Add a variable MC_MAKE_FILES, which should contain
files (e.g. generated header files) which should be
build with `mmc --make'.
Add a variable MERCURY_MAIN_MODULES which should
contain the top-level module names of the programs
or libraries in the directory. The targets for
the modules appearing in MERCURY_MAIN_MODULES
are added to MC_MAKE_FILES.
Add a variable MC_MAKE_FLAGS, which is like
MCFLAGS, but is only passed to `mmc --make'.
scripts/Mmake.rules:
Disable Mercury-specific rules when `--use-mmc-make'
is passed to mmake.
Use `mmc --make' for targets for which there are no
rules, or for targets appearing in MC_MAKE_FILES.
Estimated hours taken: 0.1
Branches: main
scripts/Mmake.rules:
Fix a bug with `--use-subdirs'. Mmake was looking for `.il' files
in the `Mercury/os' directory.
Estimated hours taken: 0.1
Branches: main
Fix bugs in my change to improve the handling of linking
with a non-installed standard library.
scripts/mmake.in:
Export MERCURY_STDLIB_DIR.
scripts/Mmake.rules:
Always set MERC_INT_DIR to avoid undefined variable warnings.
Estimated hours taken: 6
Branches: main
Allow alternative locations for the standard library files
to be specified using options to the various Mercury scripts
rather than environment variables. This change is necessary
to allow the compiler to be compiled using `mmc --make', because
`mmc --make' does not support the environment variables.
All of the Mercury scripts now accept an option
`--mercury-standard-library-directory' to specify the installed
library to use, or `--no-mercury-standard-library-directory' to
disable the use of the installed library. The location
of the alternate files to use can then be specified
using ordinary options to the scripts.
There is a new environment variable MERCURY_STDLIB_DIR, which has
the same effect as the `--mercury-standard-library-directory' option.
scripts/parse_ml_options.sh-subr.in:
scripts/mgnuc.in:
scripts/mmc.in:
scripts/mmake.in:
scripts/Mmake.vars.in:
scripts/Mmake.rules:
Handle MERCURY_STDLIB_DIR and `--mercury-standard-library-directory'.
Remove support for the MERCURY_C_INCL_DIR, MERCURY_MOD_LIB_DIRS
and MERCURY_TRACE_LIB_DIRS environment variables -- they aren't
used anywhere. MERCURY_C_INCL_DIR is being removed because the
assumption it makes (that all header files are installed into
a single directory) will not hold for much longer because the
generated header files for hl* grades are grade dependent.
compiler/options.m:
compiler/compile_target_code.m:
Add an option `--trace-init-file', used to specify `.init'
files which should only be used when tracing is enabled,
such as browser/mer_browse.init.
Allow `--mercury-stdlib-dir' as an abbreviation for
`--mercury-standard-library-directory'.
tools/lmc:
Use options rather than environment variables.
doc/user_guide.texi:
Document MERCURY_STDLIB_DIR, MERCURY_TRACE_LIB_MODS
and the `--trace-init-file' mmc option.
Remove documentation for the no longer used MERCURY_C_INCL_DIR,
MERCURY_MOD_LIB_DIRS, MERCURY_TRACE_LIB_DIRS and
MERCURY_NC_BUILTIN environment variables.
Estimated hours taken: 2
Branches: main
Add Mmake support for the Java back-end.
XXX TODO: Document it.
compiler/modules.m:
Add rules for generating `foo.javas' and `foo.classes' targets
and variables.
scripts/Mmake.rules:
compiler/modules.m:
Add rules for building .java, .java_date, and .class files.
scripts/Mmake.vars.in:
Add variables JAVAC, ALL_JAVACFLAGS, JAVACFLAGS, EXTRA_JAVACFLAGS,
TARGET_JAVACFLAGS, LIB_JAVACFLAGS, javas_subdir, java_dates_subdir,
and classes_subdir.
Also add some comments.
Estimated hours taken: 0.1
Branches: main
scripts/Mmake.rules:
Remove some unused code left over from an old method
of handling dependencies on MLOBJS.
Estimated hours taken: 0.5
Branches: main
Allow MLOBJS-module Mmake variables.
scripts/Mmake.vars.in:
Define TARGET_MLOBJS, ALL_MLOBJS and ALL_MLPICOBJS.
scripts/Mmake.rules:
compiler/modules.m:
Use ALL_MLOBJS and ALL_MLPICOBJS instead of
MLOBJS and MLPICOBJS.
Estimated hours taken: 0.5
Branches: main
scripts/Mmake.rules:
Fix a bug in my change to add timestamps for `.c' files
which broke installation of user libraries. Move the `.c_date'
file into the temporary directory with the `.c' file while
building the library to install in all the different grades.
Estimated hours taken: 8
Branches: main
Optionally generate strongly named assemblies on the IL backend.
Strongly named assemblies are required by some aspects of the .NET
framework. For example, when creating COM+ components.
We use the fact that you are allowed use the same key pair to sign more
then one assembly. The key pair we use is the one used to sign the
mercury std library. This allows us to place the correct public key
token in the `.assembly extern' reference.
README.DotNet:
Document how to generate a strongly named assembly.
compiler/mlds_to_csharp.m:
compiler/mlds_to_mcpp.m:
If --sign-assembly is enabled output a custom attribute which
references the strong name key file `mercury.sn'.
compiler/mlds_to_il.m:
If --sign-assembly is enabled add the correct decls to all the
`.assembly extern' declarations.
compiler/modules.m:
If --sign-assembly we need to generate a dependency between the IL
file and the strong name key file `mercury.sn', also add the
variable ILASM_KEYFLAG-<module> so that we add the option to sign
the assembly with the key file `mercury.sn'.
compiler/options.m:
Add --sign-assembly.
library/Mmakefile:
Install the library strong name file as `mercury.sn' in the dll
install directory.
scripts/Mmake.rules:
Add a rule to copy mercury.sn into the local subdirectory. This is
needed so that cpp and csharp modules can reference this file.
scripts/Mmake.vars.in:
Add the ILASM_KEYFLAG variables.
Estimated hours taken: 2
Branches: main
Implement the array operations (in C#).
Add flags for handling compiling C# files in the library directory.
library/Mmakefile:
Add /t:module to the C# compiler flags.
We need this because by default C# creates assemblies, but we
expect the library to be composed of modules.
library/array.m:
Implement most of the functionality of arrays in C#.
We still need to implement
array__make_empty_array/1
array__resize/4
array__shrink/3
array__copy/3
array__make_empty_array requires more RTTI support (to figure
out what type of array to create), and array__copy requires an
implementation of deep_copy.
You need the latest changes to the compiler which map array(T)
to System.Array or T[] for this to compile.
scripts/Mmake.rules:
Add ALL_MS_CSCFLAGS to the C# compiler flags.
scripts/Mmake.vars.in:
Add MS_CSCFLAGS and associated flags.
Estimated hours taken: 2
Branches: main
library/builtin.m:
library/private_builtin.m:
library/sparse_bitset.m:
library/string.m:
Change calls to mercury::runtime::convert to System::Covert.
Use __box instead of mercury::runtime::Convert::ToObject
runtime/Mmakefile:
Add a rule to remove the DOTNET_DLLS for clean_local.
runtime/mercury_il.il:
Remove ConvertImpl class, use unbox and ldobj instead of ToInt32.
runtime/mercury_mcpp.cpp:
Remove Convert class.
runtime/mercury_mcpp.h:
Use __box instead of mercury::runtime::Convert::ToObject
scripts/Mmake.rules:
Put the local include directory before the installed one when
compiling with MC++.
Also fix the rule for .cpp.dll to be the same as the subdir
rule.
Branches: main, release
Estimated hours taken: 1
Fix a bug which occurred when combining --target asm with --use-subdirs.
scripts/Mmake.rules:
compiler/modules.m:
The .pic_s files go in the `pic_ss' subdirectory,
not in the `ss' subdirectory.
scripts/Mmake.vars.in:
Add `pic_ss_subdir' variable.
Branches: main
Estimated hours taken: 2
Fix a bug with the GCC back-end Mmake support that seems to have been
triggered somehow by stayl's .c_date changes.
scripts/Mmake.rules:
For the *__c_code.{o,pic_o} targets, depend on the .s/.pic_s
file rather than the .c file, since the .c file is generated
as a side effect of generating the .s/.pic_s file.
Estimated hours taken: 4
Branches: main
Merge the changes to support csharp building into the main branch
of the compiler.
compiler/modules.m:
Write the CSHARP_ASSEMBLY_REFS-modulename for each C# foreign
module.
scripts/Mmake.rules:
Add rules to build C# DLLs.
Estimated hours taken: 0.25
Branches: main
Remove the .foreign_os target.
compiler/modules.m:
Don't generate any references to .foreign_os.
scripts/Mmake.rules:
Remove the .obj file which is created as a side effect by MSVC.
Estimated hours taken: 5
Branches: main
Add mmake support for building modules which contain foreign code on the
IL backend.
Note that currently we don't install mercury_il.dll and mercury_mcpp.dll
somewhere where the C compiler can find them, so this change doesn't
work out of the box.
compiler/mlds_to_ilasm.m:
Change the output file name for cpp files to <modulename>__cpp_code.cpp
compiler/mlds_to_mcpp.m:
No longer output a reference to <modulename>.dll, as the cpp code
doesn't refer to any of the entities defined in this dll.
compiler/modules.m:
If a module contains some foreign code and we are on the IL backend
generate a dependency which causes the foreign code dll to be built.
Generate the make variable .foreign, .foreign_cs, .foreign_os and
.foreign_dlls which refer to all the foreign modules.
Generate rules to clean the foreign modules up.
scripts/Mmake.rules:
Turn some unix paths into windows paths.
library/Mmakefile:
Use the new .foreign variables to build the library instead of the
previous hacks.