xref: /freebsd/contrib/bmake/unit-tests/suff-transform-select.mk (revision 06b9b3e0ad0dc3f0166b3e8f26ced68c271cf527)
1# $NetBSD: suff-transform-select.mk,v 1.3 2020/11/23 14:47:12 rillig Exp $
2#
3# https://gnats.netbsd.org/49086, issue 10:
4# Explicit dependencies affect transformation rule selection.
5#
6# If issue10.e is wanted and both issue10.d and issue10.f are available,
7# make should choose the .d.e rule, because .d is before .f in .SUFFIXES.
8# The bug was that if issue10.d had an explicit dependency on issue10.f,
9# it would choose .f.e instead.
10
11.MAKEFLAGS: -ds
12
13_!=	rm -f issue10.*
14
15all: issue10.e
16
17.c.d .d.c .d .d.e .e.d:
18	: 'Making ${.TARGET} from ${.IMPSRC} (first set).'
19
20.SUFFIXES: .c .d .e .f .g
21
22.e .e.f .f.e:
23	: 'Making ${.TARGET} from ${.IMPSRC} (second set).'
24
25issue10.d issue10.f:
26	: 'Making ${.TARGET} out of nothing.'
27
28# XXX: see suff-bug-endless, which must be fixed first.
29#.MAKEFLAGS: -dg1
30
31# Before 24-11-2020, resolving all.e ran into an endless loop.
32