xref: /freebsd/contrib/bmake/unit-tests/opt-debug-for.mk (revision 3c4ba5f55438f7afd4f4b0b56f88f2bb505fd6a6)
1# $NetBSD: opt-debug-for.mk,v 1.4 2020/10/05 19:27:48 rillig Exp $
2#
3# Tests for the -df command line option, which adds debug logging for
4# parsing and evaluating .for loops.
5
6.MAKEFLAGS: -df
7
8# XXX: In the debug log, the "new loop 2" appears out of context.
9# There should be a "begin loop 1" before, and all these messages should
10# contain line number information.
11#
12# XXX: The "loop body" should print the nesting level as well.
13#
14# XXX: It is hard to extract any information from the debug log since
15# the "begin" and "end" events are not balanced and the nesting level
16# is not printed consistently.  It would also be helpful to mention the
17# actual substitutions, such as "For 1: outer=b".
18#
19.for outer in a b
20.  for inner in 1 2
21VAR.${outer}${inner}=	value
22.  endfor
23.endfor
24
25all:
26	@:;
27