Commit | Line | Data |
---|---|---|
7f918cf1 CE |
1 | <!DOCTYPE html>\r |
2 | <html lang="en">\r | |
3 | <head>\r | |
4 | <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">\r | |
5 | <meta name="generator" content="AsciiDoc 8.6.9">\r | |
6 | <title>CompilingWithSMLNJ</title>\r | |
7 | <link rel="stylesheet" href="./asciidoc.css" type="text/css">\r | |
8 | <link rel="stylesheet" href="./pygments.css" type="text/css">\r | |
9 | \r | |
10 | \r | |
11 | <script type="text/javascript" src="./asciidoc.js"></script>\r | |
12 | <script type="text/javascript">\r | |
13 | /*<![CDATA[*/\r | |
14 | asciidoc.install();\r | |
15 | /*]]>*/\r | |
16 | </script>\r | |
17 | <link rel="stylesheet" href="./mlton.css" type="text/css">\r | |
18 | </head>\r | |
19 | <body class="article">\r | |
20 | <div id="banner">\r | |
21 | <div id="banner-home">\r | |
22 | <a href="./Home">MLton 20180207</a>\r | |
23 | </div>\r | |
24 | </div>\r | |
25 | <div id="header">\r | |
26 | <h1>CompilingWithSMLNJ</h1>\r | |
27 | </div>\r | |
28 | <div id="content">\r | |
29 | <div id="preamble">\r | |
30 | <div class="sectionbody">\r | |
31 | <div class="paragraph"><p>You can compile MLton with <a href="SMLNJ">SML/NJ</a>, however the resulting\r | |
32 | compiler will run much more slowly than MLton compiled by itself. We\r | |
33 | don’t recommend using SML/NJ as a means of\r | |
34 | <a href="PortingMLton">porting MLton</a> to a new platform or bootstrapping on a\r | |
35 | new platform.</p></div>\r | |
36 | <div class="paragraph"><p>If you do want to build MLton with SML/NJ, it is best to have a binary\r | |
37 | MLton package installed. If you don’t, here are some issues you may\r | |
38 | encounter when you run <span class="monospaced">make smlnj-mlton</span>.</p></div>\r | |
39 | <div class="paragraph"><p>You will get (many copies of) the error messages:</p></div>\r | |
40 | <div class="listingblock">\r | |
41 | <div class="content monospaced">\r | |
42 | <pre>/bin/sh: mlton: command not found</pre>\r | |
43 | </div></div>\r | |
44 | <div class="paragraph"><p>and</p></div>\r | |
45 | <div class="listingblock">\r | |
46 | <div class="content monospaced">\r | |
47 | <pre>make[2]: mlton: Command not found</pre>\r | |
48 | </div></div>\r | |
49 | <div class="paragraph"><p>The <span class="monospaced">Makefile</span> calls <span class="monospaced">mlton</span> to determine dependencies, and can\r | |
50 | proceed in spite of this error.</p></div>\r | |
51 | <div class="paragraph"><p>If you don’t have an <span class="monospaced">mllex</span> executable, you will get the error\r | |
52 | message:</p></div>\r | |
53 | <div class="listingblock">\r | |
54 | <div class="content monospaced">\r | |
55 | <pre>mllex: Command not found</pre>\r | |
56 | </div></div>\r | |
57 | <div class="paragraph"><p>Building MLton requires <span class="monospaced">mllex</span> and <span class="monospaced">mlyacc</span> executables, which are\r | |
58 | distributed with a binary package of MLton. The easiest solution is\r | |
59 | to copy the front-end lexer/parser files from a different machine\r | |
60 | (<span class="monospaced">ml.grm.sml</span>, <span class="monospaced">ml.grm.sig</span>, <span class="monospaced">ml.lex.sml</span>, <span class="monospaced">mlb.grm.sig</span>,\r | |
61 | <span class="monospaced">mlb.grm.sml</span>).</p></div>\r | |
62 | </div>\r | |
63 | </div>\r | |
64 | </div>\r | |
65 | <div id="footnotes"><hr></div>\r | |
66 | <div id="footer">\r | |
67 | <div id="footer-text">\r | |
68 | </div>\r | |
69 | <div id="footer-badges">\r | |
70 | </div>\r | |
71 | </div>\r | |
72 | </body>\r | |
73 | </html>\r |