head 1.15; access; symbols netbsd-11-0-RC4:1.14 netbsd-11-0-RC3:1.14 netbsd-11-0-RC2:1.14 netbsd-11-0-RC1:1.14 perseant-exfatfs-base-20250801:1.14 netbsd-11:1.14.0.2 netbsd-11-base:1.14 netbsd-10-1-RELEASE:1.6 perseant-exfatfs-base-20240630:1.8 perseant-exfatfs:1.7.0.2 perseant-exfatfs-base:1.7 netbsd-10-0-RELEASE:1.6 netbsd-10-0-RC6:1.6 netbsd-10-0-RC5:1.6 netbsd-10-0-RC4:1.6 netbsd-10-0-RC3:1.6 netbsd-10-0-RC2:1.6 netbsd-10-0-RC1:1.6 netbsd-10:1.6.0.2 netbsd-10-base:1.6 cjep_sun2x-base1:1.5 cjep_sun2x:1.5.0.4 cjep_sun2x-base:1.5 cjep_staticlib_x-base1:1.5 cjep_staticlib_x:1.5.0.2 cjep_staticlib_x-base:1.5; locks; strict; comment @# @; 1.15 date 2026.02.01.16.42.35; author rillig; state Exp; branches; next 1.14; commitid QDTzAMUxdyOj5HsG; 1.14 date 2025.03.29.19.08.53; author rillig; state Exp; branches; next 1.13; commitid y95n9TsA04p0PZOF; 1.13 date 2025.03.29.10.39.49; author rillig; state Exp; branches; next 1.12; commitid 22Yp9aLGm4mSZWOF; 1.12 date 2024.08.29.20.20.37; author rillig; state Exp; branches; next 1.11; commitid EaMgk7FrF8mB1LnF; 1.11 date 2024.07.20.11.05.12; author rillig; state Exp; branches; next 1.10; commitid Bey1UaNE0WVGeziF; 1.10 date 2024.07.05.19.47.22; author rillig; state Exp; branches; next 1.9; commitid ey8c5i7vJGMuCGgF; 1.9 date 2024.07.04.17.47.54; author rillig; state Exp; branches; next 1.8; commitid mjDGVMgldk7QYxgF; 1.8 date 2024.06.30.15.21.24; author rillig; state Exp; branches; next 1.7; commitid EKaDoruUWtqah1gF; 1.7 date 2024.04.20.10.18.55; author rillig; state Exp; branches 1.7.2.1; next 1.6; commitid 2fCjOO5HMlf2VR6F; 1.6 date 2021.06.21.08.17.39; author rillig; state Exp; branches; next 1.5; commitid gnIBYnGV8Bl3uYXC; 1.5 date 2021.02.23.15.19.41; author rillig; state Exp; branches; next 1.4; commitid wGJlKlrQTIQeBQIC; 1.4 date 2020.12.05.18.13.44; author rillig; state Exp; branches; next 1.3; commitid jzpzRYJQo4kc9AyC; 1.3 date 2020.08.28.17.15.04; author rillig; state Exp; branches; next 1.2; commitid JN9sv7fq0YXp0RlC; 1.2 date 2020.08.16.12.30.45; author rillig; state Exp; branches; next 1.1; commitid UOehUssBtowJOhkC; 1.1 date 2020.08.16.12.07.51; author rillig; state Exp; branches; next ; commitid coEgPk3hgfeYGhkC; 1.7.2.1 date 2024.07.01.01.01.15; author perseant; state Exp; branches; next 1.7.2.2; commitid NkoYLLCQWWw9v4gF; 1.7.2.2 date 2025.08.02.05.58.39; author perseant; state Exp; branches; next ; commitid 23j6GFaDws3O875G; desc @@ 1.15 log @make: in stack traces, add location information for targets @ text @make: Regex compilation error: (details omitted) while evaluating "${:Uword1 word2:C,****,____,g:C,word,____,:Q}." with value "word1 word2" in command "@@echo $@@: ${:Uword1 word2:C,****,____,g:C,word,____,:Q}." in target "mod-regex-compile-error" from varmod-subst-regex.mk:154 make: No subexpression \1 while evaluating "${:U1 23 456:C,..,\1\1,:Q}" with value "1 23 456" in command "@@echo $@@:11-missing:${:U1 23 456:C,..,\1\1,:Q}" in target "mod-regex-limits-1" from varmod-subst-regex.mk:159 make: No subexpression \1 while evaluating "${:U1 23 456:C,..,\1\1,:Q}" with value "1 23 456" in command "@@echo $@@:11-missing:${:U1 23 456:C,..,\1\1,:Q}" in target "mod-regex-limits-1" from varmod-subst-regex.mk:159 make: No subexpression \1 while evaluating "${:U1 23 456:C,..,\1\1,:Q}" with value "1 23 456" in command "@@echo $@@:11-missing:${:U1 23 456:C,..,\1\1,:Q}" in target "mod-regex-limits-1" from varmod-subst-regex.mk:159 make: No subexpression \1 while evaluating "${:U1 23 456:C,..,\1\1,:Q}" with value "1 23 456" in command "@@echo $@@:11-missing:${:U1 23 456:C,..,\1\1,:Q}" in target "mod-regex-limits-1" from varmod-subst-regex.mk:159 mod-regex-limits-2:11-ok:1 22 446 make: No subexpression \2 while evaluating "${:U1 23 456:C,..,\2\2,:Q}" with value "1 23 456" in command "@@echo $@@:22-missing:${:U1 23 456:C,..,\2\2,:Q}" in target "mod-regex-limits-3" from varmod-subst-regex.mk:163 make: No subexpression \2 while evaluating "${:U1 23 456:C,..,\2\2,:Q}" with value "1 23 456" in command "@@echo $@@:22-missing:${:U1 23 456:C,..,\2\2,:Q}" in target "mod-regex-limits-3" from varmod-subst-regex.mk:163 make: No subexpression \2 while evaluating "${:U1 23 456:C,..,\2\2,:Q}" with value "1 23 456" in command "@@echo $@@:22-missing:${:U1 23 456:C,..,\2\2,:Q}" in target "mod-regex-limits-3" from varmod-subst-regex.mk:163 make: No subexpression \2 while evaluating "${:U1 23 456:C,..,\2\2,:Q}" with value "1 23 456" in command "@@echo $@@:22-missing:${:U1 23 456:C,..,\2\2,:Q}" in target "mod-regex-limits-3" from varmod-subst-regex.mk:163 make: No subexpression \2 while evaluating "${:U1 23 456:C,(.).,\2\2,:Q}" with value "1 23 456" in command "@@echo $@@:22-missing:${:U1 23 456:C,(.).,\2\2,:Q}" in target "mod-regex-limits-4" from varmod-subst-regex.mk:165 make: No subexpression \2 while evaluating "${:U1 23 456:C,(.).,\2\2,:Q}" with value "1 23 456" in command "@@echo $@@:22-missing:${:U1 23 456:C,(.).,\2\2,:Q}" in target "mod-regex-limits-4" from varmod-subst-regex.mk:165 make: No subexpression \2 while evaluating "${:U1 23 456:C,(.).,\2\2,:Q}" with value "1 23 456" in command "@@echo $@@:22-missing:${:U1 23 456:C,(.).,\2\2,:Q}" in target "mod-regex-limits-4" from varmod-subst-regex.mk:165 make: No subexpression \2 while evaluating "${:U1 23 456:C,(.).,\2\2,:Q}" with value "1 23 456" in command "@@echo $@@:22-missing:${:U1 23 456:C,(.).,\2\2,:Q}" in target "mod-regex-limits-4" from varmod-subst-regex.mk:165 mod-regex-limits-5:22-ok:1 33 556 mod-regex-limits-6:capture:ihgfedcbaabcdefghijABCDEFGHIJa0a1a2rest make: Regex compilation error: (details omitted) while evaluating variable "UNDEF" with value "value" in command "@@echo $@@: ${UNDEF:Uvalue:C,[,,}" in target "mod-regex-errors-1" from varmod-subst-regex.mk:174 make: Unknown modifier ":Z" while evaluating "${:U:Z}y,W}" with value "" while evaluating variable "word" with value "word" in command "@@echo $@@: ${word:L:C,.*,x${:U:Z}y,W}" in target "mod-regex-errors-2" from varmod-subst-regex.mk:179 unmatched-subexpression.ok: one one 2 3 5 8 one3 2one 34 make: No match for subexpression \2 unmatched-subexpression.1: ()() make: No match for subexpression \2 unmatched-subexpression.1: ()() make: No match for subexpression \1 unmatched-subexpression.2: ()() unmatched-subexpression.3: 3 unmatched-subexpression.5: 5 unmatched-subexpression.8: 8 make: No match for subexpression \2 unmatched-subexpression.13: (3)() make: No match for subexpression \1 unmatched-subexpression.21: ()(1) unmatched-subexpression.34: 34 make: No match for subexpression \2 make: No match for subexpression \2 make: No match for subexpression \1 make: No match for subexpression \2 make: No match for subexpression \1 unmatched-subexpression.all: ()() ()() ()() 3 5 8 (3)() ()(1) 34 exit status 2 @ 1.14 log @make: add ":" to error message about unknown modifier In the manual page, the modifiers are listed with a preceding ":", so use the same pattern in the error message. This removes an inconsistency between the error messages "Unknown modifier" and "Bad modifier". @ text @d4 1 a4 1 in target "mod-regex-compile-error" d8 1 a8 1 in target "mod-regex-limits-1" d12 1 a12 1 in target "mod-regex-limits-1" d16 1 a16 1 in target "mod-regex-limits-1" d20 1 a20 1 in target "mod-regex-limits-1" d25 1 a25 1 in target "mod-regex-limits-3" d29 1 a29 1 in target "mod-regex-limits-3" d33 1 a33 1 in target "mod-regex-limits-3" d37 1 a37 1 in target "mod-regex-limits-3" d41 1 a41 1 in target "mod-regex-limits-4" d45 1 a45 1 in target "mod-regex-limits-4" d49 1 a49 1 in target "mod-regex-limits-4" d53 1 a53 1 in target "mod-regex-limits-4" d59 1 a59 1 in target "mod-regex-errors-1" d64 1 a64 1 in target "mod-regex-errors-2" @ 1.13 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 @d60 1 a60 1 make: Unknown modifier "Z" @ 1.12 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 d7 1 d11 1 d15 1 d19 1 d24 1 d28 1 d32 1 d36 1 d40 1 d44 1 d48 1 d52 1 d58 1 d63 1 @ 1.11 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 15 a15 5 make: in target "mod-regex-compile-error": while evaluating "${:Uword1 word2:C,****,____,g:C,word,____,:Q}." with value "word1 word2": Regex compilation error: (details omitted) make: in target "mod-regex-limits-1": while evaluating "${:U1 23 456:C,..,\1\1,:Q}" with value "1 23 456": No subexpression \1 make: in target "mod-regex-limits-1": while evaluating "${:U1 23 456:C,..,\1\1,:Q}" with value "1 23 456": No subexpression \1 make: in target "mod-regex-limits-1": while evaluating "${:U1 23 456:C,..,\1\1,:Q}" with value "1 23 456": No subexpression \1 make: in target "mod-regex-limits-1": while evaluating "${:U1 23 456:C,..,\1\1,:Q}" with value "1 23 456": No subexpression \1 d17 24 a40 8 make: in target "mod-regex-limits-3": while evaluating "${:U1 23 456:C,..,\2\2,:Q}" with value "1 23 456": No subexpression \2 make: in target "mod-regex-limits-3": while evaluating "${:U1 23 456:C,..,\2\2,:Q}" with value "1 23 456": No subexpression \2 make: in target "mod-regex-limits-3": while evaluating "${:U1 23 456:C,..,\2\2,:Q}" with value "1 23 456": No subexpression \2 make: in target "mod-regex-limits-3": while evaluating "${:U1 23 456:C,..,\2\2,:Q}" with value "1 23 456": No subexpression \2 make: in target "mod-regex-limits-4": while evaluating "${:U1 23 456:C,(.).,\2\2,:Q}" with value "1 23 456": No subexpression \2 make: in target "mod-regex-limits-4": while evaluating "${:U1 23 456:C,(.).,\2\2,:Q}" with value "1 23 456": No subexpression \2 make: in target "mod-regex-limits-4": while evaluating "${:U1 23 456:C,(.).,\2\2,:Q}" with value "1 23 456": No subexpression \2 make: in target "mod-regex-limits-4": while evaluating "${:U1 23 456:C,(.).,\2\2,:Q}" with value "1 23 456": No subexpression \2 d43 7 a49 2 make: in target "mod-regex-errors-1": while evaluating variable "UNDEF" with value "value": Regex compilation error: (details omitted) make: in target "mod-regex-errors-2": while evaluating variable "word" with value "word": while evaluating "${:U:Z}y,W}" with value "": Unknown modifier "Z" @ 1.10 log @make: in error messages for anonymous variables, log the value @ text @d2 17 a18 23 mod-regex-compile-error: C,word,____,:Q}. make: in target "mod-regex-limits": while evaluating "${:U1 23 456:C,..,\1\1,:Q}" with value "1 23 456": No subexpression \1 make: in target "mod-regex-limits": while evaluating "${:U1 23 456:C,..,\1\1,:Q}" with value "1 23 456": No subexpression \1 make: in target "mod-regex-limits": while evaluating "${:U1 23 456:C,..,\1\1,:Q}" with value "1 23 456": No subexpression \1 make: in target "mod-regex-limits": while evaluating "${:U1 23 456:C,..,\1\1,:Q}" with value "1 23 456": No subexpression \1 mod-regex-limits:11-missing:1 6 mod-regex-limits:11-ok:1 22 446 make: in target "mod-regex-limits": while evaluating "${:U1 23 456:C,..,\2\2,:Q}" with value "1 23 456": No subexpression \2 make: in target "mod-regex-limits": while evaluating "${:U1 23 456:C,..,\2\2,:Q}" with value "1 23 456": No subexpression \2 make: in target "mod-regex-limits": while evaluating "${:U1 23 456:C,..,\2\2,:Q}" with value "1 23 456": No subexpression \2 make: in target "mod-regex-limits": while evaluating "${:U1 23 456:C,..,\2\2,:Q}" with value "1 23 456": No subexpression \2 mod-regex-limits:22-missing:1 6 make: in target "mod-regex-limits": while evaluating "${:U1 23 456:C,(.).,\2\2,:Q}" with value "1 23 456": No subexpression \2 make: in target "mod-regex-limits": while evaluating "${:U1 23 456:C,(.).,\2\2,:Q}" with value "1 23 456": No subexpression \2 make: in target "mod-regex-limits": while evaluating "${:U1 23 456:C,(.).,\2\2,:Q}" with value "1 23 456": No subexpression \2 make: in target "mod-regex-limits": while evaluating "${:U1 23 456:C,(.).,\2\2,:Q}" with value "1 23 456": No subexpression \2 mod-regex-limits:22-missing:1 6 mod-regex-limits:22-ok:1 33 556 mod-regex-limits:capture:ihgfedcbaabcdefghijABCDEFGHIJa0a1a2rest make: in target "mod-regex-errors": while evaluating variable "UNDEF" with value "value": Regex compilation error: (details omitted) mod-regex-errors: make: in target "mod-regex-errors": while evaluating variable "word" with value "word": while evaluating "${:U:Z}y,W}" with value "": Unknown modifier "Z" mod-regex-errors: xy @ 1.9 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 @d1 1 a1 1 make: in target "mod-regex-compile-error": while evaluating "${:Uword1 word2:C,****,____,g:C,word,____,:Q}.": Regex compilation error: (details omitted) d3 4 a6 4 make: in target "mod-regex-limits": while evaluating "${:U1 23 456:C,..,\1\1,:Q}": No subexpression \1 make: in target "mod-regex-limits": while evaluating "${:U1 23 456:C,..,\1\1,:Q}": No subexpression \1 make: in target "mod-regex-limits": while evaluating "${:U1 23 456:C,..,\1\1,:Q}": No subexpression \1 make: in target "mod-regex-limits": while evaluating "${:U1 23 456:C,..,\1\1,:Q}": No subexpression \1 d9 4 a12 4 make: in target "mod-regex-limits": while evaluating "${:U1 23 456:C,..,\2\2,:Q}": No subexpression \2 make: in target "mod-regex-limits": while evaluating "${:U1 23 456:C,..,\2\2,:Q}": No subexpression \2 make: in target "mod-regex-limits": while evaluating "${:U1 23 456:C,..,\2\2,:Q}": No subexpression \2 make: in target "mod-regex-limits": while evaluating "${:U1 23 456:C,..,\2\2,:Q}": No subexpression \2 d14 4 a17 4 make: in target "mod-regex-limits": while evaluating "${:U1 23 456:C,(.).,\2\2,:Q}": No subexpression \2 make: in target "mod-regex-limits": while evaluating "${:U1 23 456:C,(.).,\2\2,:Q}": No subexpression \2 make: in target "mod-regex-limits": while evaluating "${:U1 23 456:C,(.).,\2\2,:Q}": No subexpression \2 make: in target "mod-regex-limits": while evaluating "${:U1 23 456:C,(.).,\2\2,:Q}": No subexpression \2 d23 1 a23 1 make: in target "mod-regex-errors": while evaluating variable "word" with value "word": while evaluating "${:U:Z}y,W}": Unknown modifier "Z" @ 1.8 log @make: error out on some more syntax errors Previously, these errors only produced a message on stderr. They only affected make's exit status when they were evaluated at parse time, but not when evaluating the commands for a specific target right before executing them. The affected syntax errors are: * invalid regular expressions in the ':C' modifier * out-of-range references to regex groups in the ':C' modifier * unfinished modifiers @ text @d21 1 a21 1 make: in target "mod-regex-errors": while evaluating variable "UNDEF": Regex compilation error: (details omitted) d23 1 a23 1 make: in target "mod-regex-errors": while evaluating variable "word": while evaluating "${:U:Z}y,W}": Unknown modifier "Z" @ 1.7 log @make: provide more context information for parse/evaluate errors @ text @d1 1 a1 1 make: Regex compilation error: (details omitted) d3 4 a6 4 make: No subexpression \1 make: No subexpression \1 make: No subexpression \1 make: No subexpression \1 d9 4 a12 4 make: No subexpression \2 make: No subexpression \2 make: No subexpression \2 make: No subexpression \2 d14 4 a17 4 make: No subexpression \2 make: No subexpression \2 make: No subexpression \2 make: No subexpression \2 d21 1 a21 1 make: Regex compilation error: (details omitted) @ 1.7.2.1 log @Sync with HEAD. @ text @d1 1 a1 1 make: in target "mod-regex-compile-error": while evaluating "${:Uword1 word2:C,****,____,g:C,word,____,:Q}.": Regex compilation error: (details omitted) d3 4 a6 4 make: in target "mod-regex-limits": while evaluating "${:U1 23 456:C,..,\1\1,:Q}": No subexpression \1 make: in target "mod-regex-limits": while evaluating "${:U1 23 456:C,..,\1\1,:Q}": No subexpression \1 make: in target "mod-regex-limits": while evaluating "${:U1 23 456:C,..,\1\1,:Q}": No subexpression \1 make: in target "mod-regex-limits": while evaluating "${:U1 23 456:C,..,\1\1,:Q}": No subexpression \1 d9 4 a12 4 make: in target "mod-regex-limits": while evaluating "${:U1 23 456:C,..,\2\2,:Q}": No subexpression \2 make: in target "mod-regex-limits": while evaluating "${:U1 23 456:C,..,\2\2,:Q}": No subexpression \2 make: in target "mod-regex-limits": while evaluating "${:U1 23 456:C,..,\2\2,:Q}": No subexpression \2 make: in target "mod-regex-limits": while evaluating "${:U1 23 456:C,..,\2\2,:Q}": No subexpression \2 d14 4 a17 4 make: in target "mod-regex-limits": while evaluating "${:U1 23 456:C,(.).,\2\2,:Q}": No subexpression \2 make: in target "mod-regex-limits": while evaluating "${:U1 23 456:C,(.).,\2\2,:Q}": No subexpression \2 make: in target "mod-regex-limits": while evaluating "${:U1 23 456:C,(.).,\2\2,:Q}": No subexpression \2 make: in target "mod-regex-limits": while evaluating "${:U1 23 456:C,(.).,\2\2,:Q}": No subexpression \2 d21 1 a21 1 make: in target "mod-regex-errors": while evaluating variable "UNDEF": Regex compilation error: (details omitted) @ 1.7.2.2 log @Sync with HEAD @ text @d1 24 a24 64 make: Regex compilation error: (details omitted) while evaluating "${:Uword1 word2:C,****,____,g:C,word,____,:Q}." with value "word1 word2" in command "@@echo $@@: ${:Uword1 word2:C,****,____,g:C,word,____,:Q}." in target "mod-regex-compile-error" make: No subexpression \1 while evaluating "${:U1 23 456:C,..,\1\1,:Q}" with value "1 23 456" in command "@@echo $@@:11-missing:${:U1 23 456:C,..,\1\1,:Q}" in target "mod-regex-limits-1" make: No subexpression \1 while evaluating "${:U1 23 456:C,..,\1\1,:Q}" with value "1 23 456" in command "@@echo $@@:11-missing:${:U1 23 456:C,..,\1\1,:Q}" in target "mod-regex-limits-1" make: No subexpression \1 while evaluating "${:U1 23 456:C,..,\1\1,:Q}" with value "1 23 456" in command "@@echo $@@:11-missing:${:U1 23 456:C,..,\1\1,:Q}" in target "mod-regex-limits-1" make: No subexpression \1 while evaluating "${:U1 23 456:C,..,\1\1,:Q}" with value "1 23 456" in command "@@echo $@@:11-missing:${:U1 23 456:C,..,\1\1,:Q}" in target "mod-regex-limits-1" mod-regex-limits-2:11-ok:1 22 446 make: No subexpression \2 while evaluating "${:U1 23 456:C,..,\2\2,:Q}" with value "1 23 456" in command "@@echo $@@:22-missing:${:U1 23 456:C,..,\2\2,:Q}" in target "mod-regex-limits-3" make: No subexpression \2 while evaluating "${:U1 23 456:C,..,\2\2,:Q}" with value "1 23 456" in command "@@echo $@@:22-missing:${:U1 23 456:C,..,\2\2,:Q}" in target "mod-regex-limits-3" make: No subexpression \2 while evaluating "${:U1 23 456:C,..,\2\2,:Q}" with value "1 23 456" in command "@@echo $@@:22-missing:${:U1 23 456:C,..,\2\2,:Q}" in target "mod-regex-limits-3" make: No subexpression \2 while evaluating "${:U1 23 456:C,..,\2\2,:Q}" with value "1 23 456" in command "@@echo $@@:22-missing:${:U1 23 456:C,..,\2\2,:Q}" in target "mod-regex-limits-3" make: No subexpression \2 while evaluating "${:U1 23 456:C,(.).,\2\2,:Q}" with value "1 23 456" in command "@@echo $@@:22-missing:${:U1 23 456:C,(.).,\2\2,:Q}" in target "mod-regex-limits-4" make: No subexpression \2 while evaluating "${:U1 23 456:C,(.).,\2\2,:Q}" with value "1 23 456" in command "@@echo $@@:22-missing:${:U1 23 456:C,(.).,\2\2,:Q}" in target "mod-regex-limits-4" make: No subexpression \2 while evaluating "${:U1 23 456:C,(.).,\2\2,:Q}" with value "1 23 456" in command "@@echo $@@:22-missing:${:U1 23 456:C,(.).,\2\2,:Q}" in target "mod-regex-limits-4" make: No subexpression \2 while evaluating "${:U1 23 456:C,(.).,\2\2,:Q}" with value "1 23 456" in command "@@echo $@@:22-missing:${:U1 23 456:C,(.).,\2\2,:Q}" in target "mod-regex-limits-4" mod-regex-limits-5:22-ok:1 33 556 mod-regex-limits-6:capture:ihgfedcbaabcdefghijABCDEFGHIJa0a1a2rest make: Regex compilation error: (details omitted) while evaluating variable "UNDEF" with value "value" in command "@@echo $@@: ${UNDEF:Uvalue:C,[,,}" in target "mod-regex-errors-1" make: Unknown modifier ":Z" while evaluating "${:U:Z}y,W}" with value "" while evaluating variable "word" with value "word" in command "@@echo $@@: ${word:L:C,.*,x${:U:Z}y,W}" in target "mod-regex-errors-2" @ 1.6 log @tests/make: move and extend test for unmatched '\1' in ':C' This test lived together with a few unrelated tests in moderrs.mk, it is better placed in varmod-subst-regex.mk though. While here, extend, document and explain the test since its purpose was not obvious from reading the code alone. @ text @d23 1 a23 1 make: Unknown modifier "Z" @ 1.5 log @make: improve error message for unknown modifier Back in 1995, the modifiers were all single-character, and it made sense to print only the first character. Nowadays, with ':S', ':@@var@@...@@', '::=' and several others, a little more context is useful to see where the exact error is. The actual modifier is still guessed, and the guess may be wrong as soon as backslashes get involved, but it is still better than before. @ text @d25 22 a46 1 exit status 0 @ 1.4 log @make(1): add test for unknown modifier in :C modifier replacement @ text @d23 1 a23 1 make: Unknown modifier 'Z' @ 1.3 log @make(1): fix manual page about the modifiers of the :C modifier @ text @d23 2 @ 1.2 log @make(1): move tests for :S, :C, :@@ from modmisc to their separate tests @ text @a0 4 mod-regex: :a b b c: :a b b c: : b c: d2 1 a2 4 :C,word,____,:Q}: :a c: :x__ 3 x__ 3: mod-regex-limits:00-ok:1 2323 45456 @ 1.1 log @make(1): add dummies for fine-grained tests, one per single feature The test names have been derived from the current manual page. All these tests are dummies right now, and the code from the existing tests will be moved into the new tests step by step. This is done to prevent modmisc, escape, varmod-edge and varmisc from growing without any bounds, and to reduce the side-effects of one test to the others. @ text @d1 29 @