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