title="Suffix rules in BSD Make"
BSD make (aka bmake) uses traditional suffix rules (.c.o: ...) instead
of pattern rules like gmake's (%.c:%.o: ...) which are more general
The suffix module should be re-written to work from a general
match-and-transform function on targets, which is sufficient to
implement not only traditional suffix rules and gmake pattern rules,
but also whatever other more general transformation rule syntax comes
down the pike next. Then the suffix rule syntax and pattern rule
syntax can both be fed into this code.
Note that it is already possible to write rules where the source is
computed explicitly based on the target, simply by using $(.TARGET) in
the right hand side of the rule. Investigate whether this logic should
be rewritten using the match-and-transform code, or if the
match-and-transform code should use the logic that makes these rules
Implementing pattern rules is widely desired in order to be able to
read more makefiles written for gmake, even though gmake's pattern
rules aren't well designed or particularly principled.
CVSweb for NetBSD wikisrc <wikimaster@NetBSD.org> software: FreeBSD-CVSweb