Date: Wed, 1 Nov 2000 10:30:15 +0200 (IST) From: Eli Zaretskii X-Sender: eliz AT is To: Jerzy Klejnowski cc: djgpp AT delorie DOT com Subject: Re: Make, suffix rules and pattern rules. In-Reply-To: <39FF8D41.BB16E9F6@polbox.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Reply-To: djgpp AT delorie DOT com Errors-To: nobody AT delorie DOT com X-Mailing-List: djgpp AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk 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: > > ---- > SHELL = bash > CFLAGS = -many -many -options > .SUFFIXES : > .SUFFIXES : .o .c .h > > {various rules} > @echo $< > @$(CC) -c $(CFLAGS) $< -o $@ > ---- > > 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.