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