1*9f45a3c8SSimon J. Gerraty# $NetBSD: opt-debug-parse.mk,v 1.6 2022/01/08 23:52:26 rillig Exp $ 2956e45f6SSimon J. Gerraty# 3956e45f6SSimon J. Gerraty# Tests for the -dp command line option, which adds debug logging about 4956e45f6SSimon J. Gerraty# makefile parsing. 5956e45f6SSimon J. Gerraty 6*9f45a3c8SSimon J. Gerraty.MAKEFLAGS: -dp 7*9f45a3c8SSimon J. Gerraty 8956e45f6SSimon J. Gerraty# TODO: Implementation 9956e45f6SSimon J. Gerraty 10*9f45a3c8SSimon J. Gerraty# Before parse.c 1.639 from 2022-01-08, PrintStackTrace and other diagnostics 11*9f45a3c8SSimon J. Gerraty# printed a wrong line number, using the last line before the loop body, while 12*9f45a3c8SSimon J. Gerraty# it should rather be the line number where the .for loop starts. 13*9f45a3c8SSimon J. Gerraty# 14*9f45a3c8SSimon J. Gerraty# Before parse.c 1.643 from 2022-01-08, PrintStackTrace tried to be too clever 15*9f45a3c8SSimon J. Gerraty# by merging stack trace entries, printing confusing line numbers as a result. 16*9f45a3c8SSimon J. Gerraty.for \ 17*9f45a3c8SSimon J. Gerraty var \ 18*9f45a3c8SSimon J. Gerraty in \ 19*9f45a3c8SSimon J. Gerraty value 20*9f45a3c8SSimon J. Gerraty.info trace with multi-line .for loop head 21*9f45a3c8SSimon J. Gerraty.endfor 22*9f45a3c8SSimon J. Gerraty 23*9f45a3c8SSimon J. Gerraty# Before parse.c 1.461 from 2022-01-08, the debug log said it returned to 24*9f45a3c8SSimon J. Gerraty# the line of the '.include' instead of the line following it. 25*9f45a3c8SSimon J. Gerraty.include "/dev/null" 26*9f45a3c8SSimon J. Gerraty 27*9f45a3c8SSimon J. Gerraty 28*9f45a3c8SSimon J. Gerraty# In .for loops with multiple variables, the variable details are included in 29*9f45a3c8SSimon J. Gerraty# the stack trace, just as with a single variable. 30*9f45a3c8SSimon J. Gerraty.for a b c in 1 2 3 ${:U4 5 6} 31*9f45a3c8SSimon J. Gerraty.info trace 32*9f45a3c8SSimon J. Gerraty.endfor 33*9f45a3c8SSimon J. Gerraty 34*9f45a3c8SSimon J. Gerraty 35*9f45a3c8SSimon J. Gerraty.MAKEFLAGS: -d0 36*9f45a3c8SSimon J. Gerraty 37*9f45a3c8SSimon J. Gerratyall: .PHONY 38