MPE/iX Shell and Utilities Reference Manual, Vol 1

make(1) MPE/iX Shell and Utilities make(1)
causes
adding mem.o to library mylib
to be printed.
Refer to Making Libraries in the User’s Guide for more information about libraries and the
.LIBRARY and .LIBRARYM attributes.
Meta-rules
Meta-rules have one target with a single percent symbol which matches an arbitrary string
called the stem; A%B matches any string which starts with prefix A and ends with suffix B. A
and/or B may be null. The % in a dependency stands for the stem.
The inference rule to update a target matching pattern p1%s1, where p1 and s1 are prefix and
suffix strings of the target, having a prerequisite p2%s2, where % is the stem from the target, is
specified as a rule:
p1%s1 : p2%s2 ; recipe...
Either the prefix or suffix string may be empty
With the internal macros you can specify general inference rules. If the target is out-of-date
with respect to this prerequisite, make executes that inference rule’s recipe.
Transitive Closure
Meta-rules provide a mechanism which allows several meta-rules to chain together to eventu-
ally create the target.
This is called transitive closure. For example, suppose you have the following two meta-rules
%.o : %.c
... rule body...
and
%.c : %.y
... rule body ...
When you specify
make file.o
make uses the first meta-rule to look for file.c. If it can’t find an explicit rule to build
file.c, it again looks through the meta-rules and finds the rule that tells it to look for
file.y.
1-344 Commands and Utilities