| 1 |
= MLBasisPathMap |
| 2 |
|
| 3 |
An <<MLBasis#,ML Basis>> _path map_ describes a map from ML Basis path |
| 4 |
variables (of the form `$(VAR)`) to file system paths. ML Basis path |
| 5 |
variables provide a flexible way to refer to libraries while allowing |
| 6 |
them to be moved without changing their clients. |
| 7 |
|
| 8 |
The format of an `mlb-path-map` file is a sequence of lines; each line |
| 9 |
consists of two, white-space delimited tokens. The first token is a |
| 10 |
path variable `VAR` and the second token is the path to which the |
| 11 |
variable is mapped. The path may include path variables, which are |
| 12 |
recursively expanded. |
| 13 |
|
| 14 |
The mapping from path variables to paths is initialized by the compiler. |
| 15 |
Additional path maps can be specified with `-mlb-path-map` and |
| 16 |
individual path variable mappings can be specified with |
| 17 |
`-mlb-path-var` (see <<CompileTimeOptions#>>). Configuration files are |
| 18 |
processed from first to last and from top to bottom, later mappings |
| 19 |
take precedence over earlier mappings. |
| 20 |
|
| 21 |
The compiler and system-wide configuration file makes the following |
| 22 |
path variables available. |
| 23 |
|
| 24 |
[options="header",cols="^25%,<75%"] |
| 25 |
|=== |
| 26 |
|MLB path variable|Description |
| 27 |
|`SML_LIB`|path to system-wide libraries, usually `/usr/lib/mlton/sml` |
| 28 |
|`TARGET_ARCH`|string representation of target architecture |
| 29 |
|`TARGET_OS`|string representation of target operating system |
| 30 |
|`DEFAULT_INT`|binding for default int, usually `int32` |
| 31 |
|`DEFAULT_WORD`|binding for default word, usually `word32` |
| 32 |
|`DEFAULT_REAL`|binding for default real, usually `real64` |
| 33 |
|=== |