Next: 2.4 Members of a
Up: 2. The CM model
Previous: 2.2 Description files
  Contents
Once a library has been set up as shown in the example above, one can
load it into a running interactive session by invoking function
CM.make. If the name of the library's description file is, say,
fb.cm, then one would type
CM.make "fb.cm";
at SML/NJ's interactive prompt. This will cause CM to
- parse the description file fb.cm,
- locate all its sources and all its sub-libraries,
- calculate the dependency graph,
- issue warnings and errors (and skip the remaining steps) if
necessary,
- compile those sources for which that is required,
- execute module initialization code,
- and augment the toplevel environment with bindings for exported
symbols, i.e., in our example for signature BAR and
structure Foo.
CM does not compile sources that are not ``reachable'' from the
library's exports. For every other source, it will avoid
recompilation if all of the following is true:
- The binfile for the source exists.
- The binfile has the same time stamp as the source.
- The current compilation environment for the source is precisely
the same as the compilation environment that was in effect when the
binfile was produced.
Next: 2.4 Members of a
Up: 2. The CM model
Previous: 2.2 Description files
  Contents
Matthias Blume
2001-07-19