next up previous contents
Next: 2.4 Members of a Up: 2. The CM model Previous: 2.2 Description files   Contents

2.3 Invoking CM

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

  1. parse the description file fb.cm,
  2. locate all its sources and all its sub-libraries,
  3. calculate the dependency graph,
  4. issue warnings and errors (and skip the remaining steps) if necessary,
  5. compile those sources for which that is required,
  6. execute module initialization code,
  7. 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:


next up previous contents
Next: 2.4 Members of a Up: 2. The CM model Previous: 2.2 Description files   Contents
Matthias Blume
2001-07-19