Open System Services Shell and Utilities Reference Manual (G06.28+, H06.05+)
User Commands (m - o) make(1)
.s1.s2 A double-suffix inference rule. This rule describes how to build a target that is appended
with .s2 with a prerequisite that is appended with .s1.
s1 and s2 are suffixes defined as prerequisites of the special target, .SUFFIXES. The inference
rules use the suffixes in the order in which they are specified in .SUFFIXES. A new inference
rule is started when a new line does not begin with a <Tab> or # (number sign).
If rule is empty, for example:
rule:;
execution has no effect; make recognizes that the suffix exists, but takes no actions when targets
are out-of-date.
Libraries
A target or prerequisite can also be a member of an archive library, and it is treated as such if
there are parentheses in the name. For example, library(name) indicates that name is a member
of the archive library library. To update a member of a library from a particular file, you can use
the format .s1.a, where a file with the .s1 suffix is used to update a member of the archive library.
The .a refers to an archive library.
Using Macros
Macro definitions are defined in the format:
string1=[string2]
The macro named string1 is defined as having the value of string2. The value of string2 includes
all characters (or no characters) after the equals sign (=) until a comment character (#)oran
unescaped newline character occurs. Blanks before or after the equals sign are ignored.
The forms string1[:subst1=[subst2]]) or string1[:subst1=[subst2]]} can be used to replace all
occurrences of subst1 with subst2 when the macro substitution is performed. The subst1 value is
recognized when it is a suffix at the end of a word in string1, where "word" is defined as a string
delimited by one of the following:
• The beginning of a line
• A blank
• An unescaped newline character
Macros can appear throughout the makefile, as follows:
• If a macro appears in a target line, then it is evaluated when the target line is read.
• If a macro appears in a command line, then it is evaluated when the command is exe-
cuted.
• If a macro appears in a macro definition line, it is evaluated when the new macro itself
appears in a rule or command.
If a macro has no definition, it evaluates to NULL. A new macro definition overwrites an exist-
ing macro of the same name. Macros assignments can come from the following, in the listed
order:
1. Default inference rules
2. Contents of the environment
3. Makefiles
527188-007 Hewlett-Packard Company 6−5