2022-04-03 19:52:08 +00:00
|
|
|
# $NetBSD: opt-debug-parse.mk,v 1.7 2022/02/09 21:09:24 rillig Exp $
|
2020-11-07 19:39:21 +00:00
|
|
|
#
|
|
|
|
# Tests for the -dp command line option, which adds debug logging about
|
|
|
|
# makefile parsing.
|
|
|
|
|
2022-02-05 20:03:50 +00:00
|
|
|
.MAKEFLAGS: -dp
|
|
|
|
|
2020-11-07 19:39:21 +00:00
|
|
|
# TODO: Implementation
|
|
|
|
|
2022-02-05 20:03:50 +00:00
|
|
|
# Before parse.c 1.639 from 2022-01-08, PrintStackTrace and other diagnostics
|
|
|
|
# printed a wrong line number, using the last line before the loop body, while
|
|
|
|
# it should rather be the line number where the .for loop starts.
|
|
|
|
#
|
|
|
|
# Before parse.c 1.643 from 2022-01-08, PrintStackTrace tried to be too clever
|
|
|
|
# by merging stack trace entries, printing confusing line numbers as a result.
|
|
|
|
.for \
|
|
|
|
var \
|
|
|
|
in \
|
|
|
|
value
|
|
|
|
.info trace with multi-line .for loop head
|
|
|
|
.endfor
|
|
|
|
|
2022-04-03 19:52:08 +00:00
|
|
|
# Before parse.c 1.641 from 2022-01-08, the debug log said it returned to
|
2022-02-05 20:03:50 +00:00
|
|
|
# the line of the '.include' instead of the line following it.
|
|
|
|
.include "/dev/null"
|
|
|
|
|
|
|
|
|
|
|
|
# In .for loops with multiple variables, the variable details are included in
|
|
|
|
# the stack trace, just as with a single variable.
|
|
|
|
.for a b c in 1 2 3 ${:U4 5 6}
|
|
|
|
.info trace
|
|
|
|
.endfor
|
|
|
|
|
|
|
|
|
|
|
|
.MAKEFLAGS: -d0
|
|
|
|
|
|
|
|
all: .PHONY
|