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