Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add description of Xcode and Windows to install file, Fixes #10281 #10685

Merged
3 changes: 3 additions & 0 deletions Changes
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,9 @@ Working version
(Dong An and Anukriti Kumar, review by David Allsopp, Gabriel Scherer
and Damien Doligez)

- #10281, #10685: Add description of C compiler on macOS and Windows platforms.
(Dong An, review by Xavier Leroy and David Allsopp)

- #10605: manual, name few css classes to ease styling and maintainability.
(Florian Angeletti, review by Wiktor Kuchta and Gabriel Scherer)

Expand Down
31 changes: 22 additions & 9 deletions INSTALL.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,23 @@
== Prerequisites

* A C Compiler is required.
The GNU C Compiler (`gcc`) is recommended as the bytecode interpreter takes
advantage of GCC-specific features to enhance performance. gcc is the standard
** For GNU/Linux +
The GNU C Compiler (`gcc`) is recommended as the bytecode interpreter takes
advantage of GCC-specific features to enhance performance. GCC is the standard
compiler under Linux and many other systems.
However `clang` - used in Mac OS, BSDs and others - also works fine.

** For BSDs +
`clang` is the default C compiler on BSDs - also works fine.

** For macOS +
`clang` is the default C compiler under macOS. If macOS complains no C compiler was installed while OCaml is building,
please run command `xcode-select --install` to install command-line tools and required libraries and header files.

** For Windows +
To produce native Windows executables from OCaml sources, you need to use the MSVC or Mingw-w64 ports of
OCaml, described in file https://github.com/ocaml/ocaml/blob/trunk/README.win32.adoc[README.win32.adoc]. +
For a more Unix-like experience, you can use WSL, the https://aka.ms/wsl[Windows Subsystem for Linux],
or the https://www.cygwin.com/[Cygwin environment]. You will need the GCC compiler (package `gcc-core` or `gcc`).

* GNU `make`, as well as POSIX-compatible `awk` and `sed` are required.

Expand All @@ -28,18 +41,18 @@
From the top directory, do:

./configure
+

This generates the three configuration files `Makefile.config`,
`runtime/caml/m.h` and `runtime/caml/s.h`.
+

The `configure` script accepts options that can be discovered by running:

./configure --help
+

Some options or variables like LDLIBS may not be taken into account
by the OCaml build system at the moment. Please report an issue if you
discover such a variable or option and this causes troubles to you.
+

Examples:

* Standard installation in `/usr/{bin,lib,man}` instead of `/usr/local`:
Expand Down Expand Up @@ -97,7 +110,7 @@ To be sure everything works well, you can run the test suite

You can now install the OCaml system. This will create the following commands
(in the binary directory selected during autoconfiguration):
+

[width="70%",frame="topbot",cols="25%,75%"]
|===============================================================================
| `ocamlc` | the batch bytecode compiler
Expand All @@ -114,7 +127,7 @@ You can now install the OCaml system. This will create the following commands
| `ocamlprof` | the execution count profiler
| `ocamlcp` | the bytecode compiler in profiling mode
|===============================================================================
+

From the top directory, become superuser and do:

make install
Expand Down
2 changes: 1 addition & 1 deletion README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ file LICENSE.
== Installation

See the file link:INSTALL.adoc[] for installation instructions on
machines running Unix, Linux, macOS and Cygwin. For native Microsoft
machines running Unix, Linux, macOS, WSL and Cygwin. For native Microsoft
Windows, see link:README.win32.adoc[].

== Documentation
Expand Down