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