MPE/iX Shell and Utilities Reference Manual, Vol 1

make(1) MPE/iX Shell and Utilities make(1)
Group recipes begin with [ in the first non-white space position of a line, and end with ] in
the first non-white space position of a line. Recipe lines in a group recipe need not have a
leading tab. make executes a group recipe by feeding it as a single unit to a shell. If you
immediately follow the [ at the beginning of a group recipe with one of , @ or +, they apply
to the entire group in the same way that they apply to single recipe lines.
Inference Rules
With inference rules, you can specify general rules for building files rather than creating a
specific rule for each target.
MAKE provides two forms of inferences rule: suffix rules and meta-rules. It provides suffix
rules for compatibility with older makefiles. Meta-rules are a more general technique than
suffix rules for specifying make’s default behavior. They provide a superset of the functional-
ity of suffix rules.
make uses the inference rules to infer how it can bring a target up to date. A list of inference
rules defines the commands to be executed. The default startup.mk contains a set of infer-
ence rules for the most common targets. You can specify additional rules in the makefile.
When make finds no explicit target rule to update a target, it checks the inference rules. If
make finds an applicable inference rule with an out of date prerequisite, it executes that rule’s
recipe. (See also the section describing the .DEFAULT special target).
Suffix Rules
make treats targets that begin with a period and contain no slashes or percent signs as suffix
rules. If there is only one period in the target, it is a single-suffix inference rule. Targets with
two periods are double-suffix inference rules. Suffix rules do not have prerequisites but do
have commands associated with them.
When make finds no explicit rule to update a target, it checks the suffix of that target (.s1)
against the suffix rules. make examines a prerequisite based on the base name of the target
with the second suffix (.s2) appended, and if the target is out-of-date with respect to this pre-
requisite, make executes the recipe for that inference rule.
Meta-rules take precedence over suffix rules.
If the target to be built does not contain a suffix and there is no rule for the target, make
checks the single suffix inference rules. The single suffix inference rules define how to build a
target if make finds a rule with one of the single suffixes appended. A rule with one suffix .s2
defines how to build target from target.s2. make treats the other suffix (.s1) as null.
For a suffix rule to work, the component suffixes must appear in the prerequisite list of the
.SUFFIXES special target. You turn off suffix rules by placing
.SUFFIXES:
1-342 Commands and Utilities