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