Macros in shell commands are translated when executed.
The form is as follows:
For each appearance of string1 in the evaluated macro,
string2 is substituted.
Finding string1 in $(macro)
means that the evaluated $(macro) is considered a series of strings,
each delimited by white space (blanks or tabs).
Thus, the occurrence of string1 in $(macro) means
that a regular expression of the following form was found:
This particular form was chosen because make usually concerns itself
This type of translation is useful when maintaining
Now, all that is necessary is to accumulate the
out-of-date members and write a shell script
that can handle all the C language programs
(which are those files ending in .c).
Thus, the following fragment optimizes the executions
of make for maintaining an archive library:
$(LIB): $(LIB)(a.o) $(LIB)(b.o) $(LIB)(c.o)
$(CC) -c $(CFLAGS) $(?:.o=.c)
$(AR) $(ARFLAGS) $(LIB) $?
A dependency of the preceding form is necessary for each of the different
types of source files (suffixes) that define the archive library.
These translations are added in an effort to make more general
use of the wealth of information that make generates.
Suffixes and transformation rules
© 2003 Caldera International, Inc. All rights reserved.
SCO OpenServer Release 5.0.7 -- 11 February 2003