suff-transform-endless.mk revision 1.1 1 1.1 rillig # $NetBSD: suff-transform-endless.mk,v 1.1 2020/10/20 20:36:53 rillig Exp $
2 1.1 rillig
3 1.1 rillig # https://gnats.netbsd.org/49086, issue 6:
4 1.1 rillig # Transformation search can end up in an infinite loop.
5 1.1 rillig #
6 1.1 rillig # There is no file or target from which issue6.f could be made, so
7 1.1 rillig # this should fail. The bug is that because rules .e.f, .d.e and .e.d
8 1.1 rillig # exist, make would try to make .f from .e and then infinitely try
9 1.1 rillig # to do .e from .d and vice versa.
10 1.1 rillig
11 1.1 rillig all: issue6.f
12 1.1 rillig
13 1.1 rillig .c.d .d.c .d .d.e .e.d:
14 1.1 rillig : 'Making ${.TARGET} from ${.IMPSRC}.'
15 1.1 rillig
16 1.1 rillig .SUFFIXES: .c .d .e .f
17 1.1 rillig
18 1.1 rillig .e .e.f .f.e:
19 1.1 rillig : 'Making ${.TARGET} out of nothing.'
20 1.1 rillig
21 1.1 rillig # XXX: As of 2020-10-20, the result is unexpected.
22 1.1 rillig # XXX: .d.c is not a transformation rule.
23 1.1 rillig # XXX: .d is not a transformation rule.
24 1.1 rillig # XXX: .e.d is not a transformation rule.
25 1.1 rillig # XXX: .c.d is listed as "Files that are only sources".
26 1.1 rillig # XXX: .d.e is listed as "Files that are only sources".
27 1.1 rillig # XXX: The suffixes .d and .f both have the number 3.
28 1.1 rillig # XXX: .c.d is not listed as "Transformations".
29 1.1 rillig # XXX: .d.c is not listed as "Transformations".
30 1.1 rillig # XXX: .d is not listed as "Transformations".
31 1.1 rillig # XXX: .d.e is not listed as "Transformations".
32 1.1 rillig # XXX: .e.d is not listed as "Transformations".
33 1.1 rillig # XXX: Found 'all' as '(not found)'
34 1.1 rillig # XXX: trying all.e, all.e, all.f, all.e, all.e, repeatedly.
35 1.1 rillig #.MAKEFLAGS: -dg1
36 1.1 rillig .error prevent endless loop
37