Import Upstream version 20180207
[hcoop/debian/mlton.git] / doc / guide / localhost / MLBasisPathMap
1 <!DOCTYPE html>
2 <html lang="en">
3 <head>
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">
9
10
11 <script type="text/javascript" src="./asciidoc.js"></script>
12 <script type="text/javascript">
13 /*<![CDATA[*/
14 asciidoc.install();
15 /*]]>*/
16 </script>
17 <link rel="stylesheet" href="./mlton.css" type="text/css">
18 </head>
19 <body class="article">
20 <div id="banner">
21 <div id="banner-home">
22 <a href="./Home">MLton 20180207</a>
23 </div>
24 </div>
25 <div id="header">
26 <h1>MLBasisPathMap</h1>
27 </div>
28 <div id="content">
29 <div id="preamble">
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"
49 style="
50 width:100%;
51 ">
52 <col style="width:25%;">
53 <col style="width:75%;">
54 <thead>
55 <tr>
56 <th class="tableblock halign-center valign-top" >MLB path variable</th>
57 <th class="tableblock halign-left valign-top" >Description</th>
58 </tr>
59 </thead>
60 <tbody>
61 <tr>
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>
64 </tr>
65 <tr>
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>
68 </tr>
69 <tr>
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>
72 </tr>
73 <tr>
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>
76 </tr>
77 <tr>
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>
80 </tr>
81 <tr>
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>
84 </tr>
85 </tbody>
86 </table>
87 </div>
88 </div>
89 </div>
90 <div id="footnotes"><hr></div>
91 <div id="footer">
92 <div id="footer-text">
93 </div>
94 <div id="footer-badges">
95 </div>
96 </div>
97 </body>
98 </html>