1 1.5 rillig # $NetBSD: suff-rebuild.mk,v 1.5 2020/11/21 11:55:57 rillig Exp $ 2 1.1 rillig # 3 1.1 rillig # Demonstrates what happens to transformation rules (called inference rules 4 1.1 rillig # by POSIX) when all suffixes are deleted. 5 1.1 rillig 6 1.1 rillig all: suff-rebuild-example 7 1.1 rillig 8 1.5 rillig .MAKEFLAGS: -dpst 9 1.5 rillig 10 1.1 rillig .SUFFIXES: 11 1.1 rillig 12 1.1 rillig .SUFFIXES: .a .b .c 13 1.1 rillig 14 1.1 rillig suff-rebuild-example.a: 15 1.4 rillig : Making ${.TARGET} out of nothing. 16 1.1 rillig 17 1.1 rillig .a.b: 18 1.4 rillig : Making ${.TARGET} from ${.IMPSRC}. 19 1.1 rillig .b.c: 20 1.4 rillig : Making ${.TARGET} from ${.IMPSRC}. 21 1.1 rillig .c: 22 1.4 rillig : Making ${.TARGET} from ${.IMPSRC}. 23 1.1 rillig 24 1.3 rillig # XXX: At a quick glance, the code in SuffUpdateTarget looks as if it were 25 1.1 rillig # possible to delete the suffixes in the middle of the makefile, add back 26 1.1 rillig # the suffixes from before, and have the transformation rules preserved. 27 1.1 rillig # 28 1.1 rillig # As of 2020-09-25, uncommenting the following line results in the error 29 1.1 rillig # message "don't know how to make suff-rebuild-example" though. 30 1.1 rillig # 31 1.1 rillig #.SUFFIXES: 32 1.1 rillig 33 1.1 rillig # Add the suffixes back. It should not matter that the order of the suffixes 34 1.1 rillig # is different from before. 35 1.1 rillig .SUFFIXES: .c .b .a 36