1 1.1 rillig # $NetBSD: suff-rebuild.mk,v 1.1 2020/09/25 18:18:25 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.1 rillig .SUFFIXES: 9 1.1 rillig 10 1.1 rillig .SUFFIXES: .a .b .c 11 1.1 rillig 12 1.1 rillig suff-rebuild-example.a: 13 1.1 rillig : from nothing to a 14 1.1 rillig 15 1.1 rillig .a.b: 16 1.1 rillig : from a to b 17 1.1 rillig .b.c: 18 1.1 rillig : from b to c 19 1.1 rillig .c: 20 1.1 rillig : from c to nothing 21 1.1 rillig 22 1.1 rillig # XXX: At a quick glance, the code in SuffScanTargets looks at if it were 23 1.1 rillig # possible to delete the suffixes in the middle of the makefile, add back 24 1.1 rillig # the suffixes from before, and have the transformation rules preserved. 25 1.1 rillig # 26 1.1 rillig # As of 2020-09-25, uncommenting the following line results in the error 27 1.1 rillig # message "don't know how to make suff-rebuild-example" though. 28 1.1 rillig # 29 1.1 rillig #.SUFFIXES: 30 1.1 rillig 31 1.1 rillig # Add the suffixes back. It should not matter that the order of the suffixes 32 1.1 rillig # is different from before. 33 1.1 rillig .SUFFIXES: .c .b .a 34