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