MLton MLTONWIKIVERSION

MLBasisPathMap

Home Index

An ML Basis path map describes a map from ML Basis path variables (of the form `$(VAR)`) to file system paths. ML Basis path variables provide a flexible way to refer to libraries while allowing them to be moved without changing their clients.

The format of an `mlb-path-map` file is a sequence of lines; each line consists of two, white-space delimited tokens. The first token is a path variable `VAR` and the second token is the path to which the variable is mapped. The path may include path variables, which are recursively expanded.

The mapping from path variables to paths is initialized by reading a system-wide configuration file: `/usr/lib/mlton/mlb-path-map`. Additional path maps can be specified with `-mlb-path-map` (see CompileTimeOptions). Configuration files are processed from first to last and from top to bottom, later mappings take precedence over earlier mappings.

The compiler and system-wide configuration file makes the following path variables available.

MLB path variable | Description
`SML_LIB` | path to system-wide libaries, usually `/usr/lib/mlton/sml`
`TARGET_ARCH` | string representation of target architecture
`TARGET_OS` | string representation of target operating system

Last edited on 2006-04-23 21:06:47 by MatthewFluet.