mirror of
https://github.com/Mercury-Language/mercury.git
synced 2026-04-15 01:13:30 +00:00
Minor clean-ups and fixes for README files.
Documentation/README*:
As above.
This commit is contained in:
@@ -52,12 +52,11 @@ can build programs such as `hello.m` or `calculator.m` in the [samples](samples)
|
||||
directory.
|
||||
|
||||
```
|
||||
$ cd samples
|
||||
$ mmc ---grade csharp --make hello
|
||||
mmc --grade csharp --make hello
|
||||
```
|
||||
|
||||
When building programs with the `csharp` grade you *must* use `mmc --make`; using
|
||||
`mmake` to build programs using the `csharp` grade is _not_ supported.
|
||||
When building programs with the `csharp` grade you *must* use `mmc --make`.
|
||||
Using `mmake` to build programs using the `csharp` grade is _not_ supported.
|
||||
|
||||
Running `csharp` grade programs with Mono
|
||||
-----------------------------------------
|
||||
@@ -72,7 +71,7 @@ It will then invoke then CLI execution environment on the process assembly.
|
||||
You can run the program using wrapper shell script, for example:
|
||||
|
||||
```
|
||||
$ ./hello
|
||||
./hello
|
||||
```
|
||||
|
||||
Running `csharp` grade programs on Windows with .NET
|
||||
|
||||
@@ -58,8 +58,7 @@ build programs such as `hello.m` or `calculator.m` in the [samples](samples)
|
||||
directory.
|
||||
|
||||
```
|
||||
$ cd samples
|
||||
$ mmc --grade java --make hello
|
||||
mmc --grade java --make hello
|
||||
```
|
||||
|
||||
When building programs with the `java` grade you *must* use `mmc --make`; using
|
||||
@@ -71,7 +70,7 @@ Running programs with the `java` grade
|
||||
You can run the `hello` program from the previous section by doing:
|
||||
|
||||
```
|
||||
$ ./hello
|
||||
./hello
|
||||
```
|
||||
|
||||
Note that `hello` is a simple shell script generated by the Mercury compiler
|
||||
@@ -239,7 +238,7 @@ information. You can include local variable debugging information by specifying
|
||||
`--target-debug` when invoking the Mercury compiler. For example:
|
||||
|
||||
```
|
||||
$ mmc --grade java --target-debug --make <progname>
|
||||
mmc --grade java --target-debug --make <progname>
|
||||
```
|
||||
|
||||
You can then use the `jdb` debugging tool, which comes as part of the Java SDK
|
||||
@@ -269,15 +268,15 @@ However, if you want to give it a try, the required steps are:
|
||||
|
||||
4. Build the dependencies using the following command:
|
||||
|
||||
$ mmake --use-mmc-make depend GRADE=java
|
||||
mmake --use-mmc-make depend GRADE=java
|
||||
|
||||
5. Compile using the following command:
|
||||
|
||||
$ mmake --use-mmc-make GRADE=java
|
||||
mmake --use-mmc-make GRADE=java
|
||||
|
||||
6. To install the Java version of the compiler, do:
|
||||
|
||||
$ mmake --use-mmc-make install GRADE=java
|
||||
mmake --use-mmc-make install GRADE=java
|
||||
|
||||
The Java version of the compiler MUST be built using `mmake`'s `--use-mmc-make`
|
||||
option; the build will not work otherwise. Setting the variable `GRADE` in the
|
||||
|
||||
@@ -9,4 +9,4 @@ Mercury should build and install "out-of-the-box" on Linux for AArch64.
|
||||
Low-level C grades using non-local gotos, i.e. `asm_fast.*`, do not work
|
||||
with GCC 9 or later. Non-PIC (position-independent code) actually does
|
||||
still work, but PIC is commonly the default.
|
||||
If you require a low-level C grade, please use a `reg.*` grade.
|
||||
If you require a low-level C grade, then please use a `reg.*` grade.
|
||||
|
||||
@@ -87,7 +87,7 @@ In either case, to use MSVC as the C compiler with Mercury, invoke `configure`
|
||||
as follows:
|
||||
|
||||
```
|
||||
$ ./configure --with-cc=cl [--with-msvcrt] [<any other options>]
|
||||
./configure --with-cc=cl [--with-msvcrt] [<any other options>]
|
||||
```
|
||||
|
||||
The `--with-msvcrt` flag causes executables built with this install of Mercury
|
||||
@@ -101,20 +101,25 @@ with a drive letter, except that you must use `/` instead of `\` as a directory
|
||||
separator. For example, this is acceptable:
|
||||
|
||||
```
|
||||
$ ./configure --prefix="c:/where/to/install/mercury"
|
||||
./configure --prefix="c:/where/to/install/mercury"
|
||||
```
|
||||
|
||||
but this is not:
|
||||
|
||||
```
|
||||
$ ./configure --prefix="c:\where\to\install\mercury"
|
||||
./configure --prefix="c:\where\to\install\mercury"
|
||||
```
|
||||
|
||||
Once `configure` has successfully finished, then you should do
|
||||
|
||||
```
|
||||
$ make
|
||||
$ make install
|
||||
make
|
||||
```
|
||||
|
||||
and then
|
||||
|
||||
```
|
||||
make install
|
||||
```
|
||||
|
||||
as normal.
|
||||
@@ -165,7 +170,7 @@ The MSVC port currently has a number of limitations:
|
||||
and also enable the commented out definition of `CFLAGS_FOR_DEBUG` in
|
||||
`configure.ac` (in the `msvc*` case). You will then need to regenerate
|
||||
the `configure` script and rebuild the Mercury system.
|
||||
(See [INSTALL.git](Install.git) for details of how to do this.)
|
||||
(See [../INSTALL.git](Install.git) for details of how to do this.)
|
||||
|
||||
Post-installation configuration
|
||||
-------------------------------
|
||||
@@ -229,13 +234,13 @@ Then ensure that the directory that you wish to install into is mounted
|
||||
somewhere, i.e.
|
||||
|
||||
```
|
||||
$ mount //foo/usr/local /temp_mount_point
|
||||
mount //foo/usr/local /temp_mount_point
|
||||
```
|
||||
|
||||
and then use that mount point as the location to install into
|
||||
|
||||
```
|
||||
$ make install INSTALL_PREFIX=/temp_mount_point
|
||||
make install INSTALL_PREFIX=/temp_mount_point
|
||||
```
|
||||
|
||||
This avoids the problem that `mkdir -p //foo/usr/local/xxx` fails.
|
||||
|
||||
@@ -18,5 +18,5 @@ Versions of LLVM (the underlying compiler infrastructure used by `clang`) before
|
||||
about version 2.9 contain bugs that require most C compiler optimizations to be
|
||||
disabled when compiling Mercury generated C code with `clang` (i.e. the
|
||||
generated C files have to be compiled at `-O0`). If you are using a more recent
|
||||
version of LLVM then the `configure` script will automatically enable a higher
|
||||
version of LLVM, then the `configure` script will automatically enable a higher
|
||||
level of optimization.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
Cross-compiling Mercury with GCC or clang
|
||||
========================================
|
||||
=========================================
|
||||
|
||||
You can cross-compile the Mercury system with GCC or with clang so that the
|
||||
Mercury installation will run on a different platform from your host system.
|
||||
|
||||
@@ -25,7 +25,7 @@ Macs using macOS 10.9 onwards.
|
||||
The `asm_fast*` and `reg*` grades are only available on 64-bit Intel systems
|
||||
and only when using GCC version 4.3 or later as the C compiler.
|
||||
|
||||
If `clang` is being used as the C compiler then the only low-level C grades
|
||||
If `clang` is being used as the C compiler, then the only low-level C grades
|
||||
available are the `none*` grades. The high-level C, Java and C# grades
|
||||
all work. The C# grades require the Mono .NET implementation.
|
||||
(See [README.CSharp.md](README.CSharp.md) for further details.)
|
||||
|
||||
@@ -60,7 +60,7 @@ the environment variable `SSDB` beforehand.
|
||||
ssdb>
|
||||
```
|
||||
|
||||
If you set `SSDB=0` then you will need to explicitly enable the debugger later
|
||||
If you set `SSDB=0`, then you will need to explicitly enable the debugger later
|
||||
in your code by calling `ssdb.enable_debugging/2`.
|
||||
|
||||
As in `mdb`, the three numbers are the event number, call sequence number (CSN)
|
||||
@@ -95,7 +95,7 @@ Limitations
|
||||
* The `retry` command works by executing forwards until reaching the end of
|
||||
the call to retry, then recursively calling that procedure. Any side
|
||||
effects of continuing execution will be visible. If it is not possible to
|
||||
reach the end of the procedure to retry, the program will simply keep
|
||||
reach the end of the procedure to retry, then the program will simply keep
|
||||
executing. Press ^C to get back the debugger prompt.
|
||||
|
||||
* When running on Mono 2.8 and earlier, ^C can cause the program to hang.
|
||||
|
||||
Reference in New Issue
Block a user