4 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
5 <meta name="generator" content="AsciiDoc 8.6.9">
6 <title>MLBasisPathMap</title>
7 <link rel="stylesheet" href="./asciidoc.css" type="text/css">
8 <link rel="stylesheet" href="./pygments.css" type="text/css">
11 <script type="text/javascript" src="./asciidoc.js"></script>
12 <script type="text/javascript">
17 <link rel="stylesheet" href="./mlton.css" type="text/css">
19 <body class="article">
21 <div id="banner-home">
22 <a href="./Home">MLton 20180207</a>
26 <h1>MLBasisPathMap</h1>
30 <div class="sectionbody">
31 <div class="paragraph"><p>An <a href="MLBasis">ML Basis</a> <em>path map</em> describes a map from ML Basis path
32 variables (of the form <span class="monospaced">$(VAR)</span>) to file system paths. ML Basis path
33 variables provide a flexible way to refer to libraries while allowing
34 them to be moved without changing their clients.</p></div>
35 <div class="paragraph"><p>The format of an <span class="monospaced">mlb-path-map</span> file is a sequence of lines; each line
36 consists of two, white-space delimited tokens. The first token is a
37 path variable <span class="monospaced">VAR</span> and the second token is the path to which the
38 variable is mapped. The path may include path variables, which are
39 recursively expanded.</p></div>
40 <div class="paragraph"><p>The mapping from path variables to paths is initialized by the compiler.
41 Additional path maps can be specified with <span class="monospaced">-mlb-path-map</span> and
42 individual path variable mappings can be specified with
43 <span class="monospaced">-mlb-path-var</span> (see <a href="CompileTimeOptions">CompileTimeOptions</a>). Configuration files are
44 processed from first to last and from top to bottom, later mappings
45 take precedence over earlier mappings.</p></div>
46 <div class="paragraph"><p>The compiler and system-wide configuration file makes the following
47 path variables available.</p></div>
48 <table class="tableblock frame-all grid-all"
52 <col style="width:25%;">
53 <col style="width:75%;">
56 <th class="tableblock halign-center valign-top" >MLB path variable</th>
57 <th class="tableblock halign-left valign-top" >Description</th>
62 <td class="tableblock halign-center valign-top" ><p class="tableblock"><span class="monospaced">SML_LIB</span></p></td>
63 <td class="tableblock halign-left valign-top" ><p class="tableblock">path to system-wide libraries, usually <span class="monospaced">/usr/lib/mlton/sml</span></p></td>
66 <td class="tableblock halign-center valign-top" ><p class="tableblock"><span class="monospaced">TARGET_ARCH</span></p></td>
67 <td class="tableblock halign-left valign-top" ><p class="tableblock">string representation of target architecture</p></td>
70 <td class="tableblock halign-center valign-top" ><p class="tableblock"><span class="monospaced">TARGET_OS</span></p></td>
71 <td class="tableblock halign-left valign-top" ><p class="tableblock">string representation of target operating system</p></td>
74 <td class="tableblock halign-center valign-top" ><p class="tableblock"><span class="monospaced">DEFAULT_INT</span></p></td>
75 <td class="tableblock halign-left valign-top" ><p class="tableblock">binding for default int, usually <span class="monospaced">int32</span></p></td>
78 <td class="tableblock halign-center valign-top" ><p class="tableblock"><span class="monospaced">DEFAULT_WORD</span></p></td>
79 <td class="tableblock halign-left valign-top" ><p class="tableblock">binding for default word, usually <span class="monospaced">word32</span></p></td>
82 <td class="tableblock halign-center valign-top" ><p class="tableblock"><span class="monospaced">DEFAULT_REAL</span></p></td>
83 <td class="tableblock halign-left valign-top" ><p class="tableblock">binding for default real, usually <span class="monospaced">real64</span></p></td>
90 <div id="footnotes"><hr></div>
92 <div id="footer-text">
94 <div id="footer-badges">