Estimated hours taken: 0.25
Branches: main
Simplify the simpler_c_calls_mercury and
simpler_cplusplus_calls_mercury samples to
avoid explicit construction of the `ml' command line.
samples/c_interface/simpler_c_calls_mercury/c_main.c:
Renamed as main.c.
samples/c_interface/simpler_cplusplus_calls_mercury/cpp_main.cc:
Renamed as main.cc.
samples/c_interface/simpler_c_calls_mercury/c_main.m:
samples/c_interface/simpler_cplusplus_calls_mercury/cpp_main.m:
Empty main modules, used to set the name executable
produced by mmake.
samples/c_interface/simpler_cplusplus_calls_mercury/Mmakefile:
samples/c_interface/simpler_c_calls_mercury/Mmakefile:
Handle file renamings.
Remove explicit rules to build executables.
Remove unnecessary header file dependencies.
Estimated hours taken: 0.5
Branches: main
Remove the RM_C mmake variable, which controlled whether the intermediate
`.c' files were removed (now they never are).
The implementation was buggy (it didn't work with parallel makes), and
made it difficult to avoid always recompiling the `.c' file with smart
recompilation.
Mmake.common.in:
configure.in:
README.AIX:
bindist/bindist.build_vars.in:
bindist/bindist.configure.in:
scripts/Mmake.vars.in:
scripts/Mmake.rules:
compiler/modules.m:
tools/bootcheck:
tools/binary_step:
*/Mmakefile:
Remove references to RM_C, DEFAULT_RM_C and LIBRARY_RM_C.
compiler/modules.m:
The `.o' and `.pic_o' file now depends only on the `.c' file,
not on everthing the `.c' file depends on. The extra dependencies
were only needed because the intermediate `.c' file could
be removed by RM_C. This change is needed to avoid recompiling
unchanged `.c' files with smart recompilation.
Estimated hours taken: 2.5
Fix some failing test cases in samples/c_interface.
This fixes SourceForge bug report #131053.
samples/c_interface/cplusplus_calls_mercury/Mmakefile:
samples/c_interface/mercury_calls_cplusplus/Mmakefile:
samples/c_interface/simpler_cplusplus_calls_mercury/Mmakefile:
Fix several bugs:
- use $(MGNUC) rather than hard-coding mgnuc
- pass $(ALL_GRADEFLAGS) $(ALL_MGNUCFLAGS) to mgnuc
- pass $(ALL_GRADEFLAGS) $(ALL_MLFLAGS) to ml
- s/*_REGS_H/MR_MACHDEPS_*_REGS_H/, to match
the renaming that was done a fair while back
in the runtime/machdeps/*.h.
samples/tests/c_interface/c_calls_mercury/Mmakefile:
Add an explicit dependency to ensure that runtests makes
the dependencies for the extra Mercury library used in
this test case.
Estimated hours taken: 0.5
samples/c_interface/c_calls_mercury/c_main.c:
samples/c_interface/cplusplus_calls_mercury/cpp_main.cc:
samples/c_interface/simpler_c_calls_mercury/c_main.c:
samples/c_interface/simpler_cplusplus_calls_mercury/cpp_main.cc:
Update the samples to use MR_ types and MR_ macros for
creating lists.
Estimated hours taken: 0.75
Mmakefile:
*/Mmakefile:
*/*/Mmakefile:
*/*/*/Mmakefile:
Use `clean_local' instead of `clean' and `realclean_local' instead
of `realclean' where appropriate. This is necessary now that
`realclean' does not depend on `clean'.
samples/c_interface/simpler_c_calls_mercury/README:
samples/c_interface/simpler_c_calls_mercury/c_main.c:
samples/c_interface/simpler_c_calls_mercury/mercury_lib.m:
samples/c_interface/simpler_cplusplus_calls_mercury/README:
samples/c_interface/simpler_cplusplus_calls_mercury/cpp_main.cc:
samples/c_interface/simpler_cplusplus_calls_mercury/mercury_lib.m:
Update to use the new mercury_init() and mercury_terminate()
functions.
samples/c_interface/simpler_c_calls_mercury:
Add new directory with new files README, c_main.c, Mmakefile,
and mercury_lib.m. These files demonstrate how to interface
to C using a C main() top-level rather than with a Mercury
main/2 top-level.
samples/c_interface/simpler_cplusplus_calls_mercury:
Same as above, but using C++ rather than C.