suff-rebuild.mk revision 1.4 1 # $NetBSD: suff-rebuild.mk,v 1.4 2020/11/21 08:51:57 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 : Making ${.TARGET} out of nothing.
14
15 .a.b:
16 : Making ${.TARGET} from ${.IMPSRC}.
17 .b.c:
18 : Making ${.TARGET} from ${.IMPSRC}.
19 .c:
20 : Making ${.TARGET} from ${.IMPSRC}.
21
22 # XXX: At a quick glance, the code in SuffUpdateTarget looks as 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