opt-debug-parse.mk revision 1.5 1 # $NetBSD: opt-debug-parse.mk,v 1.5 2022/01/08 23:41:43 rillig Exp $
2 #
3 # Tests for the -dp command line option, which adds debug logging about
4 # makefile parsing.
5
6 .MAKEFLAGS: -dp
7
8 # TODO: Implementation
9
10 # Before parse.c 1.639 from 2022-01-08, PrintStackTrace and other diagnostics
11 # printed a wrong line number, using the last line before the loop body, while
12 # it should rather be the line number where the .for loop starts.
13 #
14 # Before parse.c 1.643 from 2022-01-08, PrintStackTrace tried to be too clever
15 # by merging stack trace entries, printing confusing line numbers as a result.
16 .for \
17 var \
18 in \
19 value
20 .info trace with multi-line .for loop head
21 .endfor
22
23 # Before parse.c 1.461 from 2022-01-08, the debug log said it returned to
24 # the line of the '.include' instead of the line following it.
25 .include "/dev/null"
26
27 .MAKEFLAGS: -d0
28
29 all: .PHONY
30