Commit Graph

19 Commits

Author SHA1 Message Date
Julien Fischer
5f6981c7de Delete ancient workaround for g++ 2.7.
samples/c_interface/cplusplus_calls_mercury/Mmakefile:
samples/c_interface/mercury_calls_cplusplus/Mmakefile:
samples/c_interface/simpler_cplusplus_calls_mercury/Mmakefile:
     As above.
2023-03-11 14:21:10 +11:00
Julien Fischer
0cd62edc7c Clean-ups and fixes for the C interface examples.
samples/c_interface/*:
    Replace left over references to the old c_header_code pragma.

    Replace some uses of '__' as a module qualifier.

    Replace tabs with spaces.

    Add some missing words.
2023-02-25 12:53:26 +11:00
Zoltan Somogyi
d33273d033 Tell vim not to expand tabs in Makefiles.
This file-specific setting will override a default setting of expandtabs
in $HOME/.vimrc.

*/Makefile:
*/Mmakefile:
    As above.

tests/hard_coded/.gitignore:
    Don't ignore the purity subdir. This ignore must have been left over
    from when purity.m was a test in hard_coded, not hard_coded/purity,
    and it ignored an executable, not a directory.
2015-01-08 22:07:29 +11:00
Julien Fischer
553fb3f7d9 Use pragma foreign_export' in preference to pragma export' throughout
Estimated hours taken: 1
Branches: main

Use `pragma foreign_export' in preference to `pragma export' throughout
the Mercury distribution.

Convert more of the extras distribution to four-space indentation and
other minor cleanups.

browser/*.m:
library/*.m:
samples/*:
extras/*:
	As above.
2006-08-31 11:09:54 +00:00
Julien Fischer
57bfff193a Conform to recent changes in the standard library.
Estimated hours taken: 0
Branches: main

samples/c_interface/cplusplus_calls_mercury/mercury_lib.m:
	Conform to recent changes in the standard library.
2006-06-28 09:03:23 +00:00
Julien Fischer
fa555e1b36 Use '.' as the module qualifier instead of '__'.
Estimatd hours taken: 0.5
Branches: main

samples/*.m:
	Use '.' as the module qualifier instead of '__'.

	Use the new foreign language interface.

	Fix minor formatting issues.

	Use state variables for passing the I/O state.
2006-03-21 00:51:03 +00:00
Fergus Henderson
7f1b287d54 Get the "C++ calls Mercury" sample working again.
Estimated hours taken: 0.5
Branches: main

Get the "C++ calls Mercury" sample working again.

samples/c_interface/cplusplus_calls_mercury/cpp_main.cc:
	s/mercury_lib.h/mercury_lib.mh/

samples/c_interface/cplusplus_calls_mercury/Mmakefile:
	Link in -lstdc++, since recent versions of GNU C++ require this.
	Delete most of the mentions of mercury_lib.h, since they
	are now handled automatically by Mmake.
	s/mercury_lib.h/mercury_lib.mh/
2004-02-16 21:42:31 +00:00
Fergus Henderson
088a269a3d Add missing `MR_' prefixes.
Estimated hours taken: 0.25
Branches: main

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/main.c:
samples/c_interface/simpler_cplusplus_calls_mercury/main.cc:
	Add missing `MR_' prefixes.
2002-02-06 09:01:38 +00:00
Simon Taylor
cdf3ef12be Simplify the c_calls_mercury and cplusplus_calls_mercury samples.
Estimated hours taken: 0.5
Branches: main

Simplify the c_calls_mercury and cplusplus_calls_mercury samples.

c_calls_mercury/mercury_main.m:
cplusplus_calls_mercury/mercury_main.m:
c_calls_mercury/Mmakefile:
cplusplus_calls_mercury/Mmakefile:
	Import mercury_lib.m from mercury_main.m to avoid
	requiring explicit dependencies on mercury_lib.o.

	Remove unnecessary header file dependencies.
2001-12-21 06:23:01 +00:00
Simon Taylor
4167874245 Use MLOBJS, not MLLIBS, to hold the names of the
Estimated hours taken: 0.1
Branches: main, release

samples/c_interface/cpluscplus_calls_mercury/Mmakefile:
samples/c_interface/mercury_calls_c/Mmakefile:
samples/c_interface/mercury_calls_cplusplus/Mmakefile:
	Use MLOBJS, not MLLIBS, to hold the names of the
	non-Mercury object files.
2001-12-16 05:22:20 +00:00
Simon Taylor
319df48866 Remove the RM_C mmake variable, which controlled whether the intermediate
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.
2001-05-18 14:23:59 +00:00
Fergus Henderson
3f41481523 Fix some failing test cases in samples/c_interface.
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.
2001-02-05 09:35:56 +00:00
Tyson Dowd
71a07917dc Update the samples to use MR_ types and MR_ macros for
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.
2000-08-08 06:02:55 +00:00
Fergus Henderson
36c651a26d Add a missing import of module `list'. Previous versions
Estimated hours taken: 0.5

samples/c_interface/cplusplus_calls_mercury/mercury_lib.m:
	Add a missing import of module `list'.  Previous versions
	of the Mercury compiler didn't detect this error.
1999-12-13 12:54:20 +00:00
Fergus Henderson
98b0afa001 Use clean_local' instead of clean' and `realclean_local' instead
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'.
1999-09-16 04:46:31 +00:00
Fergus Henderson
cd44fb99e9 #include "mercury_imp.h" instead of "imp.h".
Estimated hours taken: 0.25

samples/c_interface/cplusplus_calls_mercury/cpp_main.cc:
	#include "mercury_imp.h" instead of "imp.h".
1998-09-02 06:51:32 +00:00
Fergus Henderson
2c4bd735b4 Add comment "This source file is hereby placed in the public domain".
Estimated hours taken: 0.25

samples/*:
	Add comment "This source file is hereby placed in the public domain".
1997-09-10 11:01:12 +00:00
Fergus Henderson
ddb73722b9 Rename all the Mmake' files as Mmakefile'. This is necessary to
avoid confusion between `Mmake' and `mmake' on case-insensitive file
systems.
1997-02-13 21:38:45 +00:00
Fergus Henderson
0b1322d17c Add an example of C++ code caling Mercury code.
Estimated hours taken: 0.5

samples/cplusplus_calls_mercury/*:
	Add an example of C++ code caling Mercury code.
1997-01-31 18:57:02 +00:00