Backport from sid to buster
[hcoop/debian/mlton.git] / doc / guide / src / CompilationManager.adoc
CommitLineData
7f918cf1
CE
1CompilationManager
2==================
3
4The http://www.smlnj.org/doc/CM/index.html[Compilation Manager] (CM) is SML/NJ's mechanism for supporting programming-in-the-very-large.
5
6== Porting SML/NJ CM files to MLton ==
7
8To help in porting CM files to MLton, the MLton source distribution
9includes the sources for a utility, `cm2mlb`, that will print an
10<:MLBasis: ML Basis> file with essentially the same semantics as the
11CM file -- handling the full syntax of CM supported by your installed
12SML/NJ version and correctly handling export filters. When `cm2mlb`
13encounters a `.cm` import, it attempts to convert it to a
14corresponding `.mlb` import. CM anchored paths are translated to
15paths according to a default configuration file
16(<!ViewGitFile(mlton,master,util/cm2mlb/cm2mlb-map)>). For example,
17the default configuration includes
18----
19# Standard ML Basis Library
20$SMLNJ-BASIS $(SML_LIB)/basis
21$basis.cm $(SML_LIB)/basis
22$basis.cm/basis.cm $(SML_LIB)/basis/basis.mlb
23----
24to ensure that a `$/basis.cm` import is translated to a
25`$(SML_LIB)/basis/basis.mlb` import. See `util/cm2mlb` for details.
26Building `cm2mlb` requires that you have already installed a recent
27version of SML/NJ.