Debian Codegraph @

doc/guide/src/CompilingWithSMLNJ.adoc

raw
1 = CompilingWithSMLNJ
2
3 You can compile MLton with <<SMLNJ#,SML/NJ>>, however the resulting
4 compiler will run much more slowly than MLton compiled by itself. We
5 don't recommend using SML/NJ as a means of
6 <<PortingMLton#,porting MLton>> to a new platform or bootstrapping on a
7 new platform.
8
9 If you do want to build MLton with SML/NJ, it is best to have a binary
10 MLton package installed. If you don't, here are some issues you may
11 encounter when you run `make smlnj-mlton`.
12
13 You will get (many copies of) the error messages:
14
15 ----
16 /bin/sh: mlton: command not found
17 ----
18
19 and
20
21 ----
22 make[2]: mlton: Command not found
23 ----
24
25 The `Makefile` calls `mlton` to determine dependencies, and can
26 proceed in spite of this error.
27
28 If you don't have an `mllex` executable, you will get the error
29 message:
30
31 ----
32 mllex: Command not found
33 ----
34
35 Building MLton requires `mllex` and `mlyacc` executables, which are
36 distributed with a binary package of MLton. The easiest solution is
37 to copy the front-end lexer/parser files from a different machine
38 (`ml.grm.sml`, `ml.grm.sig`, `ml.lex.sml`, `mlb.grm.sig`,
39 `mlb.grm.sml`).