INSTALLATION.md 1.36 KB
Newer Older
1 2
# Installation

3
## Requirements
4

POTTIER Francois's avatar
POTTIER Francois committed
5
You need OCaml 4.02 or later, ocamlbuild, and GNU make.
6

7
## Configuration Choices
8

9
### `PREFIX`
10

11
The value of the `PREFIX` variable can be changed to control where the software,
12 13
the standard library, and the documentation are stored. These files are copied
to the following places:
14

15
```
16 17
  $PREFIX/bin/
  $PREFIX/share/menhir/
18 19
  $PREFIX/share/doc/menhir/
  $PREFIX/share/man/man1/
20
```
21

22
`PREFIX` must be set when invoking `make all` and `make install` (see below).
23

24
### `USE_OCAMLFIND`
25

26 27 28 29 30
The support libraries, `MenhirLib` and `MenhirSdk`, are installed either via
ocamlfind or directly in the directory `$PREFIX/share/menhir`. Installing via
ocamlfind is recommended (and is the default). It requires the `ocamlfind`
executable to be found in the `PATH`. An explicit choice can be made by setting
`USE_OCAMLFIND` to `true` or `false` when running `make all` (see below).
31

32
### `TARGET`
33

34 35 36
If your machine does not have the native code OCaml compiler (`ocamlopt`), but
does have the bytecode compiler (`ocamlc`), then you should define `TARGET=byte`
when running `make all` and `make install`.
37

POTTIER Francois's avatar
POTTIER Francois committed
38
## Compilation and Installation
39

40
Compile and install as follows:
41

42
```
43 44
       make -f Makefile PREFIX=/usr/local USE_OCAMLFIND=true all
  sudo make -f Makefile PREFIX=/usr/local install
45
```
46

47
If necessary, adjust `PREFIX`, `USE_OCAMLFIND` and `TARGET` as described above.