Mail Archives: djgpp/2000/11/01/04:49:25
On Wed, 1 Nov 2000, Jerzy Klejnowski wrote:
> The documentation says:
> "Suffix rules cannot have any prerequisites of their own. If they
> have any, they are treated as normal files with funny names, not as
> suffix rules."
This seems to be incorrect: suffix rules with prerequisites do work
for me, at least in simple test cases such as yours. I've forwarded
your report to the mailing list where GNU Make bugs (including bugs in
documentation) should be reported.
> But pattern rule does not work for me, while suffix rule does...
> Here's part of my makefile:
>
> --<begin>--
> SHELL = bash
> CFLAGS = -many -many -options
> .SUFFIXES :
> .SUFFIXES : .o .c .h
>
> {various rules}
> @echo $<
> @$(CC) -c $(CFLAGS) $< -o $@
> --<end>--
>
> The results are:
>
> {various rules} what 'make' does
> ------------------ -----------------
> 1 %.o : %.c uses my rule
> 2 %.o : %.c header.h uses predefined rule
> 3 .c.o : uses my rule
> 4 .c.o : header.h uses my rule
I cannot reproduce this: all of the above variants work for me, using
what you call ``my rule''. Perhaps you omitted something from this
Makefile snippet, and that omitted part is responsible for the
problem.
- Raw text -