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