head 1.9; access; symbols netbsd-11-0-RC4:1.8 netbsd-11-0-RC3:1.8 netbsd-11-0-RC2:1.8 netbsd-11-0-RC1:1.8 perseant-exfatfs-base-20250801:1.8 netbsd-11:1.8.0.2 netbsd-11-base:1.8 netbsd-10-1-RELEASE:1.3 perseant-exfatfs-base-20240630:1.4 perseant-exfatfs:1.4.0.2 perseant-exfatfs-base:1.4 netbsd-10-0-RELEASE:1.3 netbsd-10-0-RC6:1.3 netbsd-10-0-RC5:1.3 netbsd-10-0-RC4:1.3 netbsd-10-0-RC3:1.3 netbsd-10-0-RC2:1.3 netbsd-10-0-RC1:1.3 netbsd-10:1.3.0.2 netbsd-10-base:1.3 cjep_sun2x-base1:1.2 cjep_sun2x:1.2.0.4 cjep_sun2x-base:1.2 cjep_staticlib_x-base1:1.2 cjep_staticlib_x:1.2.0.2 cjep_staticlib_x-base:1.2; locks; strict; comment @# @; 1.9 date 2026.02.01.16.42.35; author rillig; state Exp; branches; next 1.8; commitid QDTzAMUxdyOj5HsG; 1.8 date 2025.03.29.10.39.48; author rillig; state Exp; branches; next 1.7; commitid 22Yp9aLGm4mSZWOF; 1.7 date 2024.08.29.20.20.36; author rillig; state Exp; branches; next 1.6; commitid EaMgk7FrF8mB1LnF; 1.6 date 2024.07.20.11.05.11; author rillig; state Exp; branches; next 1.5; commitid Bey1UaNE0WVGeziF; 1.5 date 2024.07.04.17.47.54; author rillig; state Exp; branches; next 1.4; commitid mjDGVMgldk7QYxgF; 1.4 date 2024.04.20.10.18.55; author rillig; state Exp; branches 1.4.2.1; next 1.3; commitid 2fCjOO5HMlf2VR6F; 1.3 date 2021.12.09.20.13.10; author rillig; state Exp; branches; next 1.2; commitid O1mxwHYOSFzmW0kD; 1.2 date 2020.11.01.00.24.57; author rillig; state Exp; branches; next 1.1; commitid OHw4qcK0WYaGi7uC; 1.1 date 2020.08.03.15.43.32; author rillig; state Exp; branches; next ; commitid L33hp9RShIngiDiC; 1.4.2.1 date 2025.08.02.05.58.35; author perseant; state Exp; branches; next ; commitid 23j6GFaDws3O875G; desc @@ 1.9 log @make: in stack traces, add location information for targets @ text @make: In the :@@ modifier, the variable name "${:Ubar:S,b,v,}" must not contain a dollar while evaluating variable "VAR" with value "value" in command "@@echo ${VAR:Uvalue:@@${:Ubar:S,b,v,}@@x${var}y@@:Q}" in target "mod-loop-varname" from lint.mk:22 exit status 2 @ 1.8 log @make: in stack traces from target commands, add the command level A target can contain several commands, and these commands are likely to contain the same expressions. To distinguish them, add one more line to the stack trace, to narrow down the source of the error. @ text @d4 1 a4 1 in target "mod-loop-varname" @ 1.7 log @make: reduce line length in error messages The error messages for deeply nested parse errors were hard to decipher, due to the large amount of text. Split these messages into individual lines, just as in the backtrace for .include files and .for loops. This unified backtrace makes the output more uniform. @ text @d3 1 @ 1.6 log @make: don't run erroneous commands in compat mode When there is a parse or evaluation error in an expression that becomes part of the command, don't run that command, as the result of the failed evaluation typically contains garbage characters. Skip the remaining commands from that target as well, as they may depend on the erroneous command. @ text @d1 3 a3 1 make: in target "mod-loop-varname": while evaluating variable "VAR" with value "value": In the :@@ modifier, the variable name "${:Ubar:S,b,v,}" must not contain a dollar @ 1.5 log @make: add more context information to error messages In case of a parse error or evaluation error, print the variable value in addition to the variable name, to see the effects of previous expression modifiers. In nested make calls, print the current directory at the bottom of a stack trace, as that information is otherwise hard to get in a parallel build spanning multiple directories. @ text @a1 2 y@@:Q} xvaluey @ 1.4 log @make: provide more context information for parse/evaluate errors @ text @d1 1 a1 1 make: in target "mod-loop-varname": while evaluating variable "VAR": In the :@@ modifier, the variable name "${:Ubar:S,b,v,}" must not contain a dollar @ 1.4.2.1 log @Sync with HEAD @ text @d1 3 a3 4 make: In the :@@ modifier, the variable name "${:Ubar:S,b,v,}" must not contain a dollar while evaluating variable "VAR" with value "value" in command "@@echo ${VAR:Uvalue:@@${:Ubar:S,b,v,}@@x${var}y@@:Q}" in target "mod-loop-varname" @ 1.3 log @make: remove period from end of error messages and warnings The majority of the existing error messages and warnings does not include a period at the end. Follow this style consistently. @ text @d1 1 a1 1 make: In the :@@ modifier of "VAR", the variable name "${:Ubar:S,b,v,}" must not contain a dollar @ 1.2 log @make(1): in lint mode, exit with error status on errors Calling Parse_Error during parsing has always led to a nonzero exit status. Calling Parse_Error later, when expanding the shell commands, has had no effect on the exit status. Neither had calling Error. To make make a reliable tool, it has to report errors as they occur. Enable this strict behavior in lint mode for now. Lint mode has to be enabled explicitly, preserving the default behavior. @ text @d1 1 a1 1 make: In the :@@ modifier of "VAR", the variable name "${:Ubar:S,b,v,}" must not contain a dollar. @ 1.1 log @make(1): in lint mode, disallow dynamic variable names in :@@ modifier This is an extremely obscure feature that hopefully nobody ever considered using. @ text @d4 1 a4 1 exit status 0 @