On Mon, Mar 16, 2009 at 01:10:33PM -0400, Stuart Cassoff wrote:
> Must .SUFFIXES declarations come before targets?
Yes.
That's one of the many subtleties of Makefiles.
There are a few things which must occur in a specific order to work.
For a line such as:
.c.o:
to be parsed as a SUFFIX rule, you must have .SUFFIXES for .c and .o active.
(one very weird thing is that, once in, those rules never quite vanish,
and you can reactivate it much later... Try stuff like
.SUFFIXES:
.SUFFIXES: .c .o
.c.o:
$(CC) -c $*.c
.SUFFIXES:
.SUFFIXES: .c .o
and voila, your .c -> .o transformation rule is back.
If you feel like it, go read Single Unix V3, we mostly try to conform to
what it says for make(1) (along with a few extensions, and a few unfortunate
bugs).