MPE/iX Shell and Utilities Reference Manual, Vol 1

make(1) MPE/iX Shell and Utilities make(1)
in your makefile. This clears the prerequisites of the .SUFFIXES target which prevents the
enaction of any suffix rules. The order that the suffixes appear in the .SUFFIXES rule deter-
mines the order in which make checks the suffix rules.
The following steps describe the search algorithm for suffix rules:
1. Extract the suffix from the target.
2. Is it in the .SUFFIXES list? If not, then quit the search.
3. If it is in the .SUFFIXES list, look for a double suffix rule that matches the target suf-
fix.
4. If you find one, then extract the base name of the file, add on the second suffix and see
if the resulting file exists. If it doesn’t, then keep searching the double suffix rules. If it
does exist, then use the recipe for this rule.
5. If no successful match is made, then the inference has failed.
6. If the target did not have a suffix, then check the single suffix rules in the order that the
suffixes are specified in the .SUFFIXES target.
7. For each single suffix rule, add the suffix to the target name and see if the resulting file
name exists.
8. If the file exists, then execute the recipe associated with that suffix rule. If the file
doesn’t exist, continue trying the rest of the single suffix rules. If no successful match
is made, then the inference has failed.
MAKE also provides a special feature in the suffix rule mechanism for archive library handling.
If you specify a suffix rule of the form
.a.suf:
recipe
the rule matches any target having the LIBRARYM attribute set, regardless of what the actual
suffix was. For example, if your makefile contains the rules
.SUFFIXES: .a .o
.a.o :
echo adding $< to library $@
then if mem.o exists
make "mylib(mem.o)"
Commands and Utilities 1-343