Commit Graph

263 Commits

Author SHA1 Message Date
Julien Fischer
190b69d4f1 Add a new command line option that causes the compiler to print out the
set of flags that it passes to the linker in order to link against a
selected set of Mercury libraries (the standard libraries plus any others
specified via the --ml option) in the current grade.
This removes the need for using the ml script with standalone interfaces.
(Which is useful on those systems that don't have a proper shell and can't
use that script!)

compiler/compiler_target_code.m:
	Add a predicate that prints out the above information.

	Refactor code in order to to avoid duplication between the new
	functionality and the existing code for invoking the linker.

compiler/mercury_compile.m:
compiler/options.m:
	Add the new option.

doc/user_guide.texi:
	Add an entry for the new option.

samples/c_interface/standalone_c/Makefile:
	Query the compiler directly about what flags to pass to the linker
	rather than using the ml script.

	Query the compiler about what flags to pass to the C compiler as
	well.  (This was implemented a while ago, but this example was
	never updated.)

	Extend this example to optionally work with shared libraries.
2009-01-20 06:24:05 +00:00
Julien Fischer
e0f2ac1101 Don't hardcode grade and linker settings that will break on
samples/muz/Mmakefile:
	Don't hardcode grade and linker settings that will break on
	some systems.  (The defaults chosen by the compiler will be fine
	in this case.)
2008-04-04 05:33:38 +00:00
Julien Fischer
cdfff29723 Don't check the Mmakefile for a copyright message.
samples/muz/.nocopyright:
	Don't check the Mmakefile for a copyright message.
2008-04-04 05:33:34 +00:00
Julien Fischer
c5253e32fc Update the calculator2 sample.
Estimated hours take: 0.1
Branches: main

Update the calculator2 sample.

samples/calculator2.m:
	Conform to the recent change to the term.const/0 type.
2008-04-04 03:58:44 +00:00
Julien Fischer
e703156890 Ignore .mih files.
samples/.cvsignore:
	Ignore .mih files.
2008-03-04 04:41:05 +00:00
Julien Fischer
551574ea62 Remove support for automatic initialisation of solver types from the language.
Estimated hours taken: 10
Branches: main

Remove support for automatic initialisation of solver types from the language.
This is being done because:

* the current implementation of automatic initialisation means we cannot
  support polymorphic solver types, e.g. you cannot have the type foo(bar)
  where:
  		:- solver type foo(T).
		:- solver type bar.

* the current initialisation strategy is fairly ad-hoc anyway; in particular
  it has a tendency to unnecessarily change the determinism of procedures.

* mode error messages are often quite poor because of the interaction between
  automatic initialisation and impure code.

* automatic initialisation is not used in practice.  All of the
  G12 solver libraries that use solver types recommend explicitly
  initialising solver variables.

This change removes support for automatic solver initialisation from the
language.  The code for supporting it remains in the implementation, but
it is now dependent upon the developer-only `--solver-type-auto-init'
option.

As a transitional measure the compiler will still accept
`initialisation is ...' attributes in solver type definitions even when
`--no-solver-type-auto-init' is enabled.  After this change has bootstrapped,
and the relevant updates have been made to the G12 solver libraries, this
will be changed so that `initialisation is ...' attributes are considered
a syntax error unless `--solver-type-auto-init' is enabled.

doc/reference_manual.texi:
	Document that solver type definitions no longer allow initialisation
	predicates to be supplied.  (The section documenting initialisation
	predicates has been commented out rather than deleted since the
	implementation of automatic initialisation still exists.)

	Remove the section documenting the restrictions on polymorphic
	solver types.  These restrictions no longer apply in the absence
	of automatic initialisation.

compiler/options.m:
	Add a new developer-only option, `--solver-type-auto-init', that
	controls whether automatic initialisation of solver variables is
	allowed (for those solver types that have initialisation predicates
	specified.)

compiler/prog_data.m:
	Add a type that represents whether a solver type allows automatic
	initialisation or not.

	Extend the solver_type_details structure to allow initialisation
	predicates to be optional.

compiler/prog_io.m:
	Allow initialisation predicates to be optional in solver type
	definitions.

compiler/modes.m:
compiler/modecheck_call.m:
compiler/modecheck_unify.m:
	Only insert calls to solver type initialisation predicates if
	the solver type has an initialisation predicate and the
	developer-only option `--solver-type-auto-init' is enabled.

compiler/unify_proc.m:
	Handle the situation where a solver type does not have an
	initialise predicate.

compiler/add_special_pred.m:
	Only add initialisation special predicates for those solver
	types whose definition provides an initialisation predicate.

compiler/mode_info.m:
	Add a utility predicate that tests whether the support for
	automatic solver type initialisation is enabled.

compiler/type_util.m:
	Add a predicate that tests whether a type is a solver type
	that supports automatic initialisation.

	Add an XXX comment about such types and abstract equivalence
	types.

compiler/mercury_to_mercury.m:
	Conform to the above changes.

compiler/special_pred.m:
	Fix some typos.

samples/solver_types/eqneq.m:
	Delete the `initialisation is ...' from the definition of the solver
	type eqneq/1.

tests/hard_coded/Mercury.options:
	Enable `--solver-type-auto-init' for the solver_construction_init_test
	test.

tests/hard_coded/solver_build_call.m:
tests/invalid/any_pass_as_ground.m:
	Don't use automatic solver variable initialisation in these
	test cases.

tests/invalid/partial_implied_mode.err_exp:
	Conform to the above changes in the mode analyser.

tests/valid/Mercury.options:
	Compile some tests cases with `--solver-type-auto-init' enabled.
2007-10-31 04:27:29 +00:00
Julien Fischer
b2ee4a6c1f Don't check for a copyright message in the .m files in this
samples/solver_types/.nocopyright:
	Don't check for a copyright message in the .m files in this
	directory.
2007-10-31 04:27:02 +00:00
Julien Fischer
c9a93d9713 Re-add this file from a recent workspace. The version in the repository
samples/tests/c_interface/cplusplus_calls_mercury/Mmakefile:
	Re-add this file from a recent workspace.  The version in the repository
	had been truncated.
2007-10-25 14:00:17 +00:00
Julien Fischer
39506995ce Update this file.
samples/diff/.cvsignore:
	Update this file.
2007-07-16 11:45:23 +00:00
Julien Fischer
29481a796a Ignore some executables.
samples/.cvsignore:
	Ignore some executables.
2007-07-16 11:37:05 +00:00
Julien Fischer
ee03868a3c Ignore a bunch of generated files.
samples/.cvsignore:
	Ignore a bunch of generated files.
2007-07-16 11:33:59 +00:00
Julien Fischer
8ec6d0ff9c Make it easier to build the stand-alone interface example in different grades.
Estimated hours taken: 0.2
Branches: main

Make it easier to build the stand-alone interface example in different grades.

samples/c_interface/standalone_c/Makefile:
	Add a variable to set the option for setting the grade to build
	the example in.
2007-06-18 05:25:48 +00:00
Julien Fischer
690b5c0594 New file. Do not check the Makefile in this directory for
samples/c_interface/standalone_c/.nocopyright:
	New file.  Do not check the Makefile in this directory for
	a copyright message.
2007-06-18 05:25:44 +00:00
Julien Fischer
424cd0e24e Fix some bitrot in one of the samples.
Estimated hours taken: 0.5
Branches: main

Fix some bitrot in one of the samples.

samples/calculator2.m:
	Conform to changes in the ops and term standard library modules.
2007-06-04 07:48:56 +00:00
Julien Fischer
4684360b8a Delete bogus copyright message.
samples/c_interface/standalone_c/mercury_lib.m:
	Delete bogus copyright message.
2007-02-22 06:52:33 +00:00
Julien Fischer
008e7795f2 Add an example of how to use a stand-alone interface to the samples.
Estimated hours taken: 8
Branches: main

Add an example of how to use a stand-alone interface to the samples.

samples/c_interface/standalone_c/Makefile:
samples/c_interface/standalone_c/c_main.c:
samples/c_interface/standalone_c/c_main.exp:
samples/c_interface/standalone_c/mercury_lib.m:
	New files.  An annotated example of how to use a stand-alone interface.

samples/c_interface/README:
	Mention the new example.
2007-02-22 06:52:32 +00:00
Ralph Becket
ecfe6da7e8 Added a sample solver type implementation to samples.
Estimated hours taken: 4
Branches: main

Added a sample solver type implementation to samples.

NEWS:
	Report the addition.

samples/solver_types:
samples/solver_types/README:
samples/solver_types/Makefile:
samples/solver_types/eqneq.m:
samples/solver_types/sudoku.m:
samples/solver_types/sudoku_puzzle.easy:
samples/solver_types/sudoku_puzzle.hard:
samples/solver_types/test_eqneq.m:
	Added.
2007-02-15 00:32:00 +00:00
Peter Ross
f4f361d888 Update to use the new term.variable type.
Estimated hours taken: 0.1
Branches: main

samples/interpreter.m:
	Update to use the new term.variable type.
2006-11-01 23:11:23 +00:00
Julien Fischer
36ac2b4c77 Merge late changes from the 0.13 branch onto the main branch.
Estimated hours taken: 0.5
Branches: main

Merge late changes from the 0.13 branch onto the main branch.

BUGS:
	Merge in additions from the 0.12(!) branch.

HISTORY:
	Fix typos and be more consistent about the formatting of dates.

NEWS:
	Move the news about checking inst declarations for consistency
	with visible type constructors to the post-0.13 news where it belongs.

	Merge changes to the 0.13 branch.

README.Solaris:
	Merge changes from the 0.13 branch.

compiler/notes/todo.html:
	Merge changes from the 0.13 branch.

doc/user_guide.texi:
	Merge changes from 0.13 branch related to trace counts
	documentation.

extras/curses/sample/smalltest.m:
extras/gator/genotype.m:
extras/references/tests/ref_test.m:
samples/rot13/rot13_ralph.m:
tests/mmc_make/complex_test.m:
tests/mmc_make/lib/complex.m:
	Merge minor fixes from the 0.13 branch.
2006-09-15 09:11:24 +00:00
Julien Fischer
576600811f Prepare for the 0.13 release and fix/update documentation.
Estimated hours taken: 1
Branches: main, release

Prepare for the 0.13 release and fix/update documentation.

NEWS:
HISTORY:
	Update the NEWS and HISTORY files for the 0.13 release.

RELEASE_NOTES:
	s/0.12/0.13/

	Add Linux/x86_64 to the list of architectures supported by this
	release.

	Remove Solaris 8/x86 from the same list.

.README.in:
extras/README:
	Remove references to the clp(r) binding.  We no longer support it.

bindist/bindist.README:
	Update the year in the copyright message.

	Fix the gc version; 0.13 uses 6.5.

BUGS:
README.DotNet:
README.Java:
README.gcc-backend:
doc/faq.texi:
doc/make_manpage:
doc/mercury.html.in:
doc/mercury.info.in:
	s/.cs.mu.oz.au/.csse.unimelb.edu.au/

library/array.m:
library/builtin.m:
library/eqvclass.m:
library/graph.m:
samples/README:
	Fix typos.
2006-09-07 08:32:20 +00: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
88b60ce6c3 Get all of this to at least compile.
samples/muz/*.m:
	Get all of this to at least compile.
2006-07-03 07:25:48 +00:00
Julien Fischer
9b9f28e4da Conform to recent changes in the standard library.
samples/diff/*.m:
	Conform to recent changes in the standard library.

	Conform to our current coding standard.
2006-06-28 09:22:40 +00:00
Julien Fischer
566e036247 Conform to recent changes in the standard library.
Estimated hours taken: 0.1
Branches: main

samples/*.m:
	Conform to recent changes in the standard library.
2006-06-28 09:11:07 +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
b7a39efe29 Conform to recent changes in the standard library.
Estimated hours taken: 0
Branches: main

samples/c_interface/c_calls_mercury/mercury_lib.m:
	Conform to recent changes in the standard library.
2006-06-28 09:02:29 +00:00
Julien Fischer
daf357952d Update these files to conform to the current version of the
Estimated hours taken: 0
Branches: main

samples/c_interface/simpler_c_calls_mercury/mercury_lib.m:
samples/c_interface/simpler_cplusplus_calls_mercury/mercury_lib.m:
	Update these files to conform to the current version of the
	standard library.
2006-06-26 06:04:27 +00:00
Julien Fischer
a4519ed079 Move the all-solutions predicates from the library module std_util into their
Estimated hours taken: 4
Branches: main

Move the all-solutions predicates from the library module std_util into their
own module, solutions.

Move semidet_fail, semidet_succeed, cc_multi_equal and dynamic cast from
std_util.m into builtin.m.

Add some more utility functions for performing determinism or purity casts.
(The later are primarily intended for use by solver implementors.)

library/std_util.m:
	Move the all-solutions predicates into their own module, solutions.m.
	For now there are (obsolete) forwarding predicates from this module to
	the new one.  The forwarding predicates will be included in the
	upcoming 0.13 release and then removed in later versions.

	Move semidet_succeed, semidet_fail, cc_multi_equal and dynamic_cast
	to builtin.m

library/solutions.m:
	New file.  This is the new home for the all-solutions predicates.
	This is pretty much cut and pasted from std_util (with module
	qualifiers updated accordingly).  I've rearranged the code in a more
	top-down fashion as per our current coding standard.

library/builtin.m:
	Move semidet_fail/0, semidet_succeed/0, cc_multi_equal/2 and
	dynamic_cast/2 to this module.

	Add semidet_true/0 and semidet_false/0 as synonyms for semidet_fail/0
	and semidet_succeed/0.

	Add impure_true/0 and semipure_true/0.  These are useful for performing
	purity casts, e.g. in solver implementations.

library/library.m:
	Add the new module.

NEWS:
	Announce the changes.

library/*.m:
	Update to conform to the above.

compiler/const_prop.m:
	Update evaluate_semidet_call/5 with the new module name for
	dynamic_cast.

compiler/*.m:
	Module qualify calls to solutions to either disambiguate them from the
	versions in std_util (where they weren't module qualified) or change
	the module qualifier where they were (to avoid warnings about calls to
	the now deprecated versions).

tests/debugger/declarative/solutions.*:
	Rename this module as the name conflicts with the new library module.

tests/debugger/declarative/solns.*:
	Renamed version of above (with updated expected output).

tests/debugger/declarative/Mmakefile:
	Handle the renamed version of the solutions test.

tests/debugger/all_solutions.m:
tests/debugger/declarative/args.m:
tests/debugger/declarative/library_forwarding.m:
tests/hard_coded/constant_prop_2.m:
tests/invalid/multisoln_func.m:
tests/invalid/one_member.m:
tests/invalid/promise_equivalent_claueses.m:
tests/valid/simplify_bug2.m:
tests/valid/solv.m:
	Update to conform to the above changes.

sample/solutions/*.m:
	Update to conform to the above changes.
2006-03-24 04:40:59 +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
Julien Fischer
b8050e1b10 Replace deprecated mode and inst syntax.
samples/e.m:
	Replace deprecated mode and inst syntax.
	(Reported by Doug Auclair).
2006-03-06 00:47:46 +00:00
Zoltan Somogyi
5fb5874ba3 Fix some violations of good style in the sample programs.
Estimated hours taken: 0.3
Branches: main, release

samples/*.m:
	Fix some violations of good style in the sample programs.
2005-08-12 04:50:37 +00:00
Julien Fischer
f1a4faead7 Update this example to use the new foreign language interface.
Estimated hours taken: 0.1
Branches: main, release

samples/c_interface/short_example.m:
	Update this example to use the new foreign language interface.
2005-02-23 13:29:00 +00:00
Ian MacLarty
c3e0be6dca Bring some samples up to date with current coding standards.
Estimated hours taken: 1.0
Branches: main and 0.12

Bring some samples up to date with current coding standards.

samples/calculator.m
samples/calculator2.m
samples/cat.m
samples/e.m
samples/eliza.m
samples/expand_terms.m
samples/hello.m
samples/interpreter.m
samples/sort.m
samples/ultra_sub.m
	Bring up to date with current coding standards.
2005-02-09 08:41:13 +00:00
Julien Fischer
98216c6a31 Fix a typo.
samples/eliza.m:
	Fix a typo.
2004-09-28 16:14:48 +00:00
Zoltan Somogyi
70df929cde Fix formatting.
Estimated hours taken: 0.1
Branches: main

samples/cat.m:
	Fix formatting.
2004-08-30 05:06:10 +00:00
Zoltan Somogyi
af83fe936f Fix indentation error.
Estimated hours taken: 0.1
Branches: main

samples/eliza.m:
	Fix indentation error.
2004-08-13 02:11:51 +00:00
Fergus Henderson
11f32861fa New file, showing how to compute the first N solutions of a
Estimated hours taken: 0.5
Branches: main

samples/solutions/n_solutions.m:
	New file, showing how to compute the first N solutions of a
	nondeterministic predicate.
2004-07-26 00:51:24 +00:00
Fergus Henderson
b13d2b7573 Get the simpler "C++ calls Mercury" sample working again.
Estimated hours taken: 0.1
Branches: main

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

samples/c_interface/simpler_cplusplus_calls_mercury/main.cc:
	s/mercury_lib.h/mercury_lib.mh/

samples/c_interface/simpler_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:58:22 +00:00
Fergus Henderson
1ca4a57926 Get the simpler "C calls Mercury" sample working again.
Estimated hours taken: 0.1
Branches: main

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

samples/c_interface/simpler_c_calls_mercury/main.c:
samples/c_interface/simpler_c_calls_mercury/Mmakefile:
	s/mercury_lib.h/mercury_lib.mh/

samples/c_interface/simpler_c_calls_mercury/Mmakefile:
	Delete most of the mentions of mercury_lib.h, since they
	are now handled automatically by Mmake.
2004-02-16 21:54:37 +00:00
Fergus Henderson
3ff51ae3b3 Get the "C calls Mercury" sample working again.
Estimated hours taken: 0.1
Branches: main

Get the "C calls Mercury" sample working again.

samples/c_interface/c_calls_mercury/c_main.c:
samples/c_interface/c_calls_mercury/Mmakefile:
	s/mercury_lib.h/mercury_lib.mh/

samples/c_interface/c_calls_mercury/Mmakefile:
	Delete most of the mentions of mercury_lib.h, since they
	are now handled automatically by Mmake.
2004-02-16 21:47:01 +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
2bda4471e2 Fix a bug where the Mercury calls C++ sample was not linking with the
Estimated hours taken: 0.25
Branches: main

Fix a bug where the Mercury calls C++ sample was not linking with the
C++ library.  This worked, because the sample didn't actually make use
of the C++ library, but failed as soon as users tried to extend the
sample to use with their real C++ programs.

samples/c_interface/mercury_calls_cplusplus/cpp_main.cc:
	Use the C++ standard library's stream I/O, rather than printf().

samples/c_interface/mercury_calls_cplusplus/Mmakefile:
	Make sure that we link with the C++ standard library.
	Also, comment out the old hack that worked around a g++ 2.7 bug
	which is fixed in g++ 2.95.
2003-10-09 03:09:53 +00:00
Fergus Henderson
c880e31dbe Fix a bug where the Mercury calls C++ sample was actually using C, not C++.
Estimated hours taken: 0.25
Branches: main

Fix a bug where the Mercury calls C++ sample was actually using C, not C++.

samples/c_interface/mercury_calls_cplusplus/cpp_main.c:
samples/c_interface/mercury_calls_cplusplus/cpp_main.cc:
	Rename cpp_main.c as cpp_main.cc, so that it gets compiled as C++
	code rather than as C code.  Add a dummy class declaration to its
	source, to check that it is really C++ code.
2003-10-08 12:15:44 +00:00
Peter Ross
f30ed91489 Backout some accidently committed changes.
Estimated hours taken: 0.1
Branches: main

runtime/mercury_construct.c:
samples/diff/Mmakefile:
	Backout some accidently committed changes.
2003-03-10 14:25:44 +00:00
Peter Ross
efdaf1f224 Fix a performance bug where dead_pred_elim was taking a significant
Estimated hours taken: 6
Branches: main

Fix a performance bug where dead_pred_elim was taking a significant
amount of time to delete entries from the predicate_table.  With this
change dead_pred_elim goes from 12 minutes to 55 seconds CPU time in
the IL grade when compiling accumulator.m with
--intermodule-optimization turned on.

compiler/hlds_module.m:
	Implement a new predicate, predicate_table_restrict, which
	restricts the predicate_table to include only a subset of the
	predicates.
	Rather than deleting all the non-needed entries, this
	predicate builds the predicate_table from scratch again, hence
	this predicate is only useful when the number of predicates to
	keep is significantly less than the number of predicates to
	delete.
	Change predicate_table_do_insert so that it records in the
	pred_info whether or not a predicate can only be accessed by
	its fully qualified name, this is needed so that the
	predicate_table can be rebuilt correctly.

compiler/dead_proc_elim.m:
	Use predicate_table_restrict to restrict the set of pred_ids
	in the predicate_table rather than module_info_remove_predicate
	as the amount of predicates to keep is in general
	significantly smaller than the number of predicates to keep.

compiler/hlds_pred.m:
	Add a new pred_marker which indicates whether or not a
	predicate can only be accessed by its fully qualified name.

compiler/hlds_out.m:
compiler/intermod.m:
	Handle the new pred_marker.
2003-03-10 14:10:55 +00:00
Fergus Henderson
a18332a294 Various fixes for the .NET back-end.
Estimated hours taken: 3
Branches: main

Various fixes for the .NET back-end.

compiler/Mmakefile:
	For IL grades, use editbin to set the stack size to 100M,
	since the default (1M) is too small.
	Also, don't try to build mlds_to_gcc in IL grades -- gcc.m won't
	compile, because the IL grades don't support the C interface.

library/Mmakefile:
	Add some missing dependencies.

profiler/Mmakefile:
deep_profiler/Mmakefile:
	Conditionalize some dependencies that were bogus for IL grades.

library/.cvsignore:
compiler/.cvsignore:
profiler/.cvsignore:
deep_profiler/.cvsignore:
analysis/.cvsignore:
browser/.cvsignore:
samples/.cvsignore:
	Various minor updates to ignore files produced when building in
	IL grades.
2003-02-15 23:59:41 +00:00
Fergus Henderson
06cd026178 Add .cvsignore.
Estimated hours taken: 0.25
Branches: main

samples/.nocopyright:
	Add .cvsignore.
2003-02-15 23:50:42 +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
66bf99c9d6 Simplify the simpler_c_calls_mercury and
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.
2001-12-21 06:37:46 +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