5.2 Creating interface files
You can create the interface files for one or more source files
using the following commands:
mmc --make-short-interface module_1.m module_2.m …
mmc --make-private-interface module_1.m module_2.m …
mmc --make-interface module_1.m module_2.m …
- The first command builds (or rebuilds)
the ‘.int3’ file of each module contained in the named source files.
(Not just the top module of each source file.)
- The second command builds (or rebuilds)
the ‘.int0’ file of each module contained in the named source files.
(Note that only modules that have submodules need ‘.int0’ files.)
- The third command builds (or rebuilds)
both the ‘.int’ and ‘.int2’ file
of each module contained in the named source files.
There are constraints on the order in which these interface files can be built.
- Each .int3 file depends only on the source code of the module it is for.
Since
.int0, .int and .int2 files
all depend on .int3 files,
the building process must start off by building .int3 files.
The order in which they are built does not matter.
- Each .int0 file depends only
on the .int3 files that the module it is for imports,
directly or indirectly,
and
on the .int0 files of its ancestor modules (if any).
Therefore the .int0 files of the program must be built next,
with the .int0 files of ancestor modules being built
before the .int0 files of descendant modules.
- Each .int file, and its specialized .int2 version,
depends on the .int3 files that the module it is for imports,
directly or indirectly,
and on the .int0 files of its ancestor modules (if any).
Therefore these files will in general be the last interface files built.
The order in which they are built does not matter.
As the description above shows,
interface files will in general be built in an order
with the .int3 files first, then the .int0 files,
and then the .int/.int2 files.
However, there is no hard-and-fast separation between these phases.
For example, if neither module_a nor any of its ancestors
import module_z either directly or indirectly,
then it is ok
- to build module_a.int0
before module_z.int3, and
- to build module_a.int
before module_z.int0 or module_z.int3.