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