opt-debug-parse.mk revision 1.7 1 1.7 rillig # $NetBSD: opt-debug-parse.mk,v 1.7 2022/02/09 21:09:24 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.2 rillig .info trace with multi-line .for loop head
21 1.2 rillig .endfor
22 1.2 rillig
23 1.7 rillig # Before parse.c 1.641 from 2022-01-08, the debug log said it returned to
24 1.4 rillig # the line of the '.include' instead of the line following it.
25 1.3 rillig .include "/dev/null"
26 1.3 rillig
27 1.6 rillig
28 1.6 rillig # In .for loops with multiple variables, the variable details are included in
29 1.6 rillig # the stack trace, just as with a single variable.
30 1.6 rillig .for a b c in 1 2 3 ${:U4 5 6}
31 1.6 rillig .info trace
32 1.6 rillig .endfor
33 1.6 rillig
34 1.6 rillig
35 1.2 rillig .MAKEFLAGS: -d0
36 1.2 rillig
37 1.2 rillig all: .PHONY
38