Paul Smith wrote, on 04 Nov 2020: > > On Wed, 2020-11-04 at 16:47 +0000, Geoff Clare via austin-group-l at > The Open Group wrote:
> > Here's a modified version of the proposed example that uses this new > > technique. Note that you have to use "make -r" otherwise it uses the > > default .c.o rule instead! The rules for a.o and b.o seem to be > > needed by SunPro make but not by GNU make. > > > > .POSIX: > > .SUFFIXES: .c .i .o > > To avoid using make -r you can clear the suffixes before defining new > ones: > > .SUFFIXES: > .SUFFIXES: .c .i .o That doesn't make any difference, since .c and .o are both in the specified suffixes, so that brings the default .c.o rule into play. One way of handling the issue is to alert the user to the need to use -r if they forget: CC = echo "Please use make -r"; false (Of course, this means you can't use $(CC) in the specified rules, but my example uses c99 so it works there.) -- Geoff Clare <g.cl...@opengroup.org> The Open Group, Apex Plaza, Forbury Road, Reading, RG1 1AX, England