]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - contrib/bmake/unit-tests/suff-rebuild.mk
Update to bmake-20201101
[FreeBSD/FreeBSD.git] / contrib / bmake / unit-tests / suff-rebuild.mk
1 # $NetBSD: suff-rebuild.mk,v 1.2 2020/10/18 16:12:39 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 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