Modula-2 ||
Compiler & Tools ||
Library ||
Search Engine
Ulm's Modula-2 System:
mmm
NAME
mmm - make makefile for Modula-2
SYNOPSIS
mmm
[-aelLmPtT]
[-v(-|r|s)]
[-(c|C|u)
makefile]
[-p proto]
[file...]
DESCRIPTION
Mmm
is a general tool for extracting dependency information from
Modula-2 and Modula/R source files.
By default
mmm
generates output in a form acceptable by make(1)
onto standard output.
If
-c
is given, a makefile is created which
can be updated later using
-u.
Makefiles created by
-c
contain several sections delimited by comments.
Every section which is to be updated by
mmm
is preceded by a comment with a keyword enclosed in braces.
Macro definitions generated by
mmm
(except those defined in the {macros} section)
may be redefined without losing their value on updates.
If
-e
is given
environment variables supercede any macro value defaults of
mmm
on makefile creation.
Flags given by makefile creation or updating are
remembered by a special comment inside the makefile
and work as defaults
for further
mmm
invocations.
By default
mmm
works on the source files given in the command line.
They may be omitted on makefile updating if
a SRC macro definition is found.
On makefile creation a prototype is taken
(except
-C
is given instead of
-c).
Mmm
tries to take $HOME/.mmm_proto first,
then /usr/local/lib/modula/mmm_proto.
These defaults may be overrided by giving another prototype file
using the -p option.
A typical prototype consists of the wanted section headings
and some additional rules like cleanup and source file printing.
For each main module the transitive closure of dependencies
is calculated and printed in the list of modules to be linked to.
The main module names determine the output filenames of ld(1).
Following flags are available:
- -a
- This flag is necessary if symbol files are to be archived in SYM.
If you decide to archive symbol files you must create SYM first.
This is best done by ar q SYM.
- -l
- Generate rules for maintaining non-main-objects in a library.
The filename of the library may be given in the environment parameter
LIB (if
-e
is given)
or may be modified in the macro definition.
- -L
- Generate dependencies even to not explicitely given modules.
For doing this the complete MODPATH (see m2c)
and the library (MODLIB or /usr/local/lib/modula) are considered.
On this flag
mmm
warns about every module not found.
- -m
- implies
-l
and causes
mmm
to generate rules for supporting a library with profiled objects
of non-main modules.
See m2c
for more information about profiled libraries.
- -P
- Report about calling reference cycles
(e.g. module a imports b and module b imports a).
The main problem of reference cycles is the undefined order of
initialization;
so every reference cycle member must not use anything of the other
members during initialization.
- -t
- Print given source files in topsorted order.
Following command causes correct order of compilation:
m2c `mmm -t *.d *.m2` or mrc `mmm -t *.d* *.m[r2]`
- -T
- Print imports in a form suitable for tsort(1):
file1 file2
means file2 imports from file1.
Unlike to the dependency section in makefiles the source file names
are printed.
So
-T
is very similar to
-t:
m2c `mmm -t *.d *.m2`
is equivalent to m2c `mmm -T *.d *.m2 | tsort`
and equivalent to m2c `mmm -T *.d *.m2 | cut -d' ' -f1 | uniq`
- -v
- Support one of the version managers (s for SCCS or
r for rcs).
The use of any version manager can be switched off by giving -.
Because version archive names are derived from the original
file names by adding some prefix or suffix,
problems may occur with long file or module names.
Mmm
warns if any of these problems could arise.
SEE ALSO
m2c, mdb, make(1)
FILES
/usr/local/lib/modula/mmm_proto |
default prototype
|
$HOME/.mmm_proto |
own prototype file
|
BUGS
Various difficulties
(e.g. m2c does not find symbol files)
occur if
the first 11 characters of a module name
are not identical to the corresponding file name.
On
-L,
mmm
generates dependencies to symbolfiles in libraries only.
So, implementation module updating in libraries
don't causes
make(1)
to link again.
That's because
mmm
doesn't know about inter-library dependencies.
Make(1)
has several bugs and shortcomings (due to design errors)
in context with archives and version managers.
To get around them
mmm
is forced in some cases to avoid rules and to generate
transformations explicitely.
Also, sometimes the order of files depending on
is not lexicographic but topologic.
Edited by: borchert, last change: 2003/12/10, revision: 1.3, converted to HTML: 1903/12/10
Modula-2 ||
Compiler & Tools ||
Library ||
Search Engine