mamake reads
make abstract machine target and prerequisite file descriptions from a mamfile (see
-f) and
executes actions to update targets that are older than their prerequisites. Mamfiles are generated by the
--mam option of
nmake(1) and
gmake(1) and
are portable to environments that only have
sh(1) and
cc(1).
In practice mamake is used to bootstrap build nmake(1) and
ksh(1) in new environments. Mamfiles are used rather than old-make
makefiles because some features are not reliably supported across all make variants:
- action execution
Multi-line actions are executed as a unit by $SHELL. There are
some shell constructs that cannot be expressed in an old-make makefile.
- viewpathing
VPATH is properly interpreted. This allows source to be separate from
generated files.
- recursion
Ordered subdirectory recursion over unrelated makefiles.
mamprobe(1) is called to probe and generate system specific variable
definitions. The probe information is regenerated when it is older than the
mamprobe command.
For compatibility with nmake(1) the -K option and the recurse
and cc-* command line targets are ignored.