head 1.27; access; symbols netbsd-11-0-RC6:1.27 netbsd-11-0-RC5:1.27 netbsd-11-0-RC4:1.27 netbsd-11-0-RC3:1.27 netbsd-11-0-RC2:1.27 netbsd-11-0-RC1:1.27 perseant-exfatfs-base-20250801:1.27 netbsd-11:1.27.0.2 netbsd-11-base:1.27 netbsd-10-1-RELEASE:1.7 perseant-exfatfs-base-20240630:1.18 perseant-exfatfs:1.18.0.2 perseant-exfatfs-base:1.18 netbsd-10-0-RELEASE:1.7 netbsd-10-0-RC6:1.7 netbsd-10-0-RC5:1.7 netbsd-10-0-RC4:1.7 netbsd-10-0-RC3:1.7 netbsd-10-0-RC2:1.7 netbsd-10-0-RC1:1.7 netbsd-10:1.7.0.2 netbsd-10-base:1.7 cjep_sun2x-base1:1.3 cjep_sun2x:1.3.0.4 cjep_sun2x-base:1.3 cjep_staticlib_x-base1:1.3 cjep_staticlib_x:1.3.0.2 cjep_staticlib_x-base:1.3; locks; strict; comment @# @; 1.27 date 2025.06.29.09.40.13; author rillig; state Exp; branches; next 1.26; commitid pYgMrYqIM5SvIL0G; 1.26 date 2025.06.28.22.39.29; author rillig; state Exp; branches; next 1.25; commitid CDDpACH2g2jV3I0G; 1.25 date 2025.03.30.09.51.51; author rillig; state Exp; branches; next 1.24; commitid veGmSzVhPiW2G4PF; 1.24 date 2025.03.29.19.08.52; author rillig; state Exp; branches; next 1.23; commitid y95n9TsA04p0PZOF; 1.23 date 2025.01.11.20.54.46; author rillig; state Exp; branches; next 1.22; commitid v92duHXtj62ZR6FF; 1.22 date 2024.08.29.20.20.36; author rillig; state Exp; branches; next 1.21; commitid EaMgk7FrF8mB1LnF; 1.21 date 2024.08.06.18.00.17; author rillig; state Exp; branches; next 1.20; commitid 1R0ZDok3menTZMkF; 1.20 date 2024.07.09.17.07.23; author rillig; state Exp; branches; next 1.19; commitid NJg1r2mb3SlxBbhF; 1.19 date 2024.07.04.17.47.54; author rillig; state Exp; branches; next 1.18; commitid mjDGVMgldk7QYxgF; 1.18 date 2024.06.15.19.43.56; author rillig; state Exp; branches 1.18.2.1; next 1.17; commitid nOsOnvTS9bkff7eF; 1.17 date 2024.06.05.22.06.53; author rillig; state Exp; branches; next 1.16; commitid akrVWnt69UKgmQcF; 1.16 date 2024.04.23.22.51.28; author rillig; state Exp; branches; next 1.15; commitid 4KO7gVEQREzhZj7F; 1.15 date 2024.04.20.10.18.55; author rillig; state Exp; branches; next 1.14; commitid 2fCjOO5HMlf2VR6F; 1.14 date 2023.12.17.23.19.02; author rillig; state Exp; branches; next 1.13; commitid SEMti6grvv0CfSQE; 1.13 date 2023.12.17.00.19.11; author rillig; state Exp; branches; next 1.12; commitid JLxBUTcurO3oCKQE; 1.12 date 2023.12.16.23.40.33; author rillig; state Exp; branches; next 1.11; commitid mNRU6wLBJPI8pKQE; 1.11 date 2023.12.16.23.38.35; author rillig; state Exp; branches; next 1.10; commitid A5bnToi5rw7hnKQE; 1.10 date 2023.06.23.04.56.54; author rillig; state Exp; branches; next 1.9; commitid 1LIyVjZbCpYRO1uE; 1.9 date 2023.06.22.13.02.42; author rillig; state Exp; branches; next 1.8; commitid 06Rm0oURuLu0zWtE; 1.8 date 2023.06.22.09.09.08; author rillig; state Exp; branches; next 1.7; commitid u4FKCu3OdSzTgVtE; 1.7 date 2022.06.11.09.15.49; author rillig; state Exp; branches; next 1.6; commitid Bgaswe5inb2voBHD; 1.6 date 2022.06.11.07.54.25; author rillig; state Exp; branches; next 1.5; commitid mpSWjv38c0UwWAHD; 1.5 date 2022.03.03.20.20.23; author rillig; state Exp; branches; next 1.4; commitid W4yIciemRXqPhOuD; 1.4 date 2022.03.03.19.36.35; author rillig; state Exp; branches; next 1.3; commitid faQJWLUTqSno2OuD; 1.3 date 2020.09.12.22.35.43; author rillig; state Exp; branches; next 1.2; commitid EH6vxLDlCtCuiOnC; 1.2 date 2020.08.16.20.03.53; author rillig; state Exp; branches; next 1.1; commitid GIdRpOKN6gOhkkkC; 1.1 date 2020.08.16.12.07.51; author rillig; state Exp; branches; next ; commitid coEgPk3hgfeYGhkC; 1.18.2.1 date 2025.08.02.05.58.39; author perseant; state Exp; branches; next ; commitid 23j6GFaDws3O875G; desc @@ 1.27 log @tests/make: test backslash at the end of a line and in the :M modifier As described in PR bin/46139 by David A. Holland. @ text @make: varmod-match.mk:293: Unfinished character list in pattern "a[" of modifier ":M" while evaluating variable "WORDS" with value "a a[" make: varmod-match.mk:301: Unfinished character list in pattern "a[^" of modifier ":M" while evaluating variable "WORDS" with value "a a[ aX" make: varmod-match.mk:309: Unfinished character list in pattern "[-x1-3" of modifier ":M" while evaluating variable "WORDS" with value "- + x xx 0 1 2 3 4 [x1-3" make: varmod-match.mk:317: Unfinished character list in pattern "*[-x1-3" of modifier ":M" while evaluating variable "WORDS" with value "- + x xx 0 1 2 3 4 00 01 10 11 000 001 010 011 100 101 110 111 [x1-3" make: varmod-match.mk:326: Unfinished character list in pattern "[^-x1-3" of modifier ":M" while evaluating variable "WORDS" with value "- + x xx 0 1 2 3 4 [x1-3" make: varmod-match.mk:340: Unfinished character list in pattern "?[\" of modifier ":M" while evaluating variable "WORDS" with value "\\ \a x\" make: varmod-match.mk:348: Unfinished character range in pattern "[x-" of modifier ":M" while evaluating variable "WORDS" with value "[x- x x- y" make: varmod-match.mk:360: Unfinished character range in pattern "[^x-" of modifier ":M" while evaluating variable "WORDS" with value "[x- x x- y yyyyy" make: varmod-match.mk:367: Unfinished character list in pattern "[" of modifier ":M" while evaluating variable " : :: " with value " : :: " make: varmod-match.mk:367: Unknown modifier ":]" while evaluating variable " : :: " with value "" make: Fatal errors encountered -- cannot continue make: stopped in unit-tests exit status 1 @ 1.26 log @make: consistently use double quotes in error messages Previously, some error messages used single quotes, very few used backticks or parentheses, most already used double quotes. While here, reword a few error messages to be clearer or more consistent with related error messages. @ text @d1 1 a1 1 make: varmod-match.mk:289: Unfinished character list in pattern "a[" of modifier ":M" d3 1 a3 1 make: varmod-match.mk:297: Unfinished character list in pattern "a[^" of modifier ":M" d5 1 a5 1 make: varmod-match.mk:305: Unfinished character list in pattern "[-x1-3" of modifier ":M" d7 1 a7 1 make: varmod-match.mk:313: Unfinished character list in pattern "*[-x1-3" of modifier ":M" d9 1 a9 1 make: varmod-match.mk:322: Unfinished character list in pattern "[^-x1-3" of modifier ":M" d11 1 a11 1 make: varmod-match.mk:336: Unfinished character list in pattern "?[\" of modifier ":M" d13 1 a13 1 make: varmod-match.mk:344: Unfinished character range in pattern "[x-" of modifier ":M" d15 1 a15 1 make: varmod-match.mk:356: Unfinished character range in pattern "[^x-" of modifier ":M" d17 1 a17 1 make: varmod-match.mk:363: Unfinished character list in pattern "[" of modifier ":M" d19 1 a19 1 make: varmod-match.mk:363: Unknown modifier ":]" @ 1.25 log @make: use '"filename" line 123' for locations instead of 'filename:123' The format 'filename:123' is commonly used for identifying a location in a file. Text editors recognize it and allow quick navigation through it. The previous format was specific to make and would have required custom support in editors. The new format was already used in stack traces, except for the first line. Now all lines use the same format. @ text @d1 1 a1 1 make: varmod-match.mk:289: Unfinished character list in pattern 'a[' of modifier ':M' d3 1 a3 1 make: varmod-match.mk:297: Unfinished character list in pattern 'a[^' of modifier ':M' d5 1 a5 1 make: varmod-match.mk:305: Unfinished character list in pattern '[-x1-3' of modifier ':M' d7 1 a7 1 make: varmod-match.mk:313: Unfinished character list in pattern '*[-x1-3' of modifier ':M' d9 1 a9 1 make: varmod-match.mk:322: Unfinished character list in pattern '[^-x1-3' of modifier ':M' d11 1 a11 1 make: varmod-match.mk:336: Unfinished character list in pattern '?[\' of modifier ':M' d13 1 a13 1 make: varmod-match.mk:344: Unfinished character range in pattern '[x-' of modifier ':M' d15 1 a15 1 make: varmod-match.mk:356: Unfinished character range in pattern '[^x-' of modifier ':M' d17 1 a17 1 make: varmod-match.mk:363: Unfinished character list in pattern '[' of modifier ':M' @ 1.24 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 @d1 1 a1 1 make: "varmod-match.mk" line 289: Unfinished character list in pattern 'a[' of modifier ':M' d3 1 a3 1 make: "varmod-match.mk" line 297: Unfinished character list in pattern 'a[^' of modifier ':M' d5 1 a5 1 make: "varmod-match.mk" line 305: Unfinished character list in pattern '[-x1-3' of modifier ':M' d7 1 a7 1 make: "varmod-match.mk" line 313: Unfinished character list in pattern '*[-x1-3' of modifier ':M' d9 1 a9 1 make: "varmod-match.mk" line 322: Unfinished character list in pattern '[^-x1-3' of modifier ':M' d11 1 a11 1 make: "varmod-match.mk" line 336: Unfinished character list in pattern '?[\' of modifier ':M' d13 1 a13 1 make: "varmod-match.mk" line 344: Unfinished character range in pattern '[x-' of modifier ':M' d15 1 a15 1 make: "varmod-match.mk" line 356: Unfinished character range in pattern '[^x-' of modifier ':M' d17 1 a17 1 make: "varmod-match.mk" line 363: Unfinished character list in pattern '[' of modifier ':M' d19 1 a19 1 make: "varmod-match.mk" line 363: Unknown modifier ":]" @ 1.23 log @make: omit redundant follow-up message "Malformed conditional" If there is a parse error or an evaluation error during the conditional, the conditional is already mentioned in the "while evaluating condition" line, so there's no reason to repeat it once again. Same for the "Bad condition" message from the '?:' modifier. @ text @d19 1 a19 1 make: "varmod-match.mk" line 363: Unknown modifier "]" @ 1.22 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 @d17 1 a17 1 make: "varmod-match.mk" line 364: Unfinished character list in pattern '[' of modifier ':M' d19 1 a19 1 make: "varmod-match.mk" line 364: Unknown modifier "]" a20 1 make: "varmod-match.mk" line 364: Malformed conditional '${ ${:U\:} ${:U\:\:} :L:M[:]} != ":"' @ 1.21 log @make: in error message about conditionals, use single quotes Single quotes are used less often in the conditionals themselves, which leads to fewer confusions. @ text @d1 20 a20 10 make: "varmod-match.mk" line 289: while evaluating variable "WORDS" with value "a a[": Unfinished character list in pattern 'a[' of modifier ':M' make: "varmod-match.mk" line 297: while evaluating variable "WORDS" with value "a a[ aX": Unfinished character list in pattern 'a[^' of modifier ':M' make: "varmod-match.mk" line 305: while evaluating variable "WORDS" with value "- + x xx 0 1 2 3 4 [x1-3": Unfinished character list in pattern '[-x1-3' of modifier ':M' make: "varmod-match.mk" line 313: while evaluating variable "WORDS" with value "- + x xx 0 1 2 3 4 00 01 10 11 000 001 010 011 100 101 110 111 [x1-3": Unfinished character list in pattern '*[-x1-3' of modifier ':M' make: "varmod-match.mk" line 322: while evaluating variable "WORDS" with value "- + x xx 0 1 2 3 4 [x1-3": Unfinished character list in pattern '[^-x1-3' of modifier ':M' make: "varmod-match.mk" line 336: while evaluating variable "WORDS" with value "\\ \a x\": Unfinished character list in pattern '?[\' of modifier ':M' make: "varmod-match.mk" line 344: while evaluating variable "WORDS" with value "[x- x x- y": Unfinished character range in pattern '[x-' of modifier ':M' make: "varmod-match.mk" line 356: while evaluating variable "WORDS" with value "[x- x x- y yyyyy": Unfinished character range in pattern '[^x-' of modifier ':M' make: "varmod-match.mk" line 364: while evaluating variable " : :: " with value " : :: ": Unfinished character list in pattern '[' of modifier ':M' make: "varmod-match.mk" line 364: while evaluating variable " : :: " with value "": Unknown modifier "]" @ 1.20 log @make: error out on syntax errors in ':M' and ':N' modifiers More than a year ago, the warning has been added. Now it has been promoted to an error. @ text @d11 1 a11 1 make: "varmod-match.mk" line 364: Malformed conditional (${ ${:U\:} ${:U\:\:} :L:M[:]} != ":") @ 1.19 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 9 a9 9 make: "varmod-match.mk" line 289: warning: while evaluating variable "WORDS" with value "a a[": Unfinished character list in pattern 'a[' of modifier ':M' make: "varmod-match.mk" line 297: warning: while evaluating variable "WORDS" with value "a a[ aX": Unfinished character list in pattern 'a[^' of modifier ':M' make: "varmod-match.mk" line 305: warning: while evaluating variable "WORDS" with value "- + x xx 0 1 2 3 4 [x1-3": Unfinished character list in pattern '[-x1-3' of modifier ':M' make: "varmod-match.mk" line 313: warning: while evaluating variable "WORDS" with value "- + x xx 0 1 2 3 4 00 01 10 11 000 001 010 011 100 101 110 111 [x1-3": Unfinished character list in pattern '*[-x1-3' of modifier ':M' make: "varmod-match.mk" line 322: warning: while evaluating variable "WORDS" with value "- + x xx 0 1 2 3 4 [x1-3": Unfinished character list in pattern '[^-x1-3' of modifier ':M' make: "varmod-match.mk" line 336: warning: while evaluating variable "WORDS" with value "\\ \a x\": Unfinished character list in pattern '?[\' of modifier ':M' make: "varmod-match.mk" line 344: warning: while evaluating variable "WORDS" with value "[x- x x- y": Unfinished character range in pattern '[x-' of modifier ':M' make: "varmod-match.mk" line 356: warning: while evaluating variable "WORDS" with value "[x- x x- y yyyyy": Unfinished character range in pattern '[^x-' of modifier ':M' make: "varmod-match.mk" line 364: warning: while evaluating variable " : :: " with value " : :: ": Unfinished character list in pattern '[' of modifier ':M' @ 1.18 log @make: in warnings, move the word "warning" to the front @ text @d1 10 a10 10 make: "varmod-match.mk" line 289: warning: while evaluating variable "WORDS": Unfinished character list in pattern 'a[' of modifier ':M' make: "varmod-match.mk" line 297: warning: while evaluating variable "WORDS": Unfinished character list in pattern 'a[^' of modifier ':M' make: "varmod-match.mk" line 305: warning: while evaluating variable "WORDS": Unfinished character list in pattern '[-x1-3' of modifier ':M' make: "varmod-match.mk" line 313: warning: while evaluating variable "WORDS": Unfinished character list in pattern '*[-x1-3' of modifier ':M' make: "varmod-match.mk" line 322: warning: while evaluating variable "WORDS": Unfinished character list in pattern '[^-x1-3' of modifier ':M' make: "varmod-match.mk" line 336: warning: while evaluating variable "WORDS": Unfinished character list in pattern '?[\' of modifier ':M' make: "varmod-match.mk" line 344: warning: while evaluating variable "WORDS": Unfinished character range in pattern '[x-' of modifier ':M' make: "varmod-match.mk" line 356: warning: while evaluating variable "WORDS": Unfinished character range in pattern '[^x-' of modifier ':M' make: "varmod-match.mk" line 364: warning: while evaluating variable " : :: ": Unfinished character list in pattern '[' of modifier ':M' make: "varmod-match.mk" line 364: while evaluating variable " : :: ": Unknown modifier "]" @ 1.18.2.1 log @Sync with HEAD @ text @d1 11 a11 20 make: varmod-match.mk:293: Unfinished character list in pattern "a[" of modifier ":M" while evaluating variable "WORDS" with value "a a[" make: varmod-match.mk:301: Unfinished character list in pattern "a[^" of modifier ":M" while evaluating variable "WORDS" with value "a a[ aX" make: varmod-match.mk:309: Unfinished character list in pattern "[-x1-3" of modifier ":M" while evaluating variable "WORDS" with value "- + x xx 0 1 2 3 4 [x1-3" make: varmod-match.mk:317: Unfinished character list in pattern "*[-x1-3" of modifier ":M" while evaluating variable "WORDS" with value "- + x xx 0 1 2 3 4 00 01 10 11 000 001 010 011 100 101 110 111 [x1-3" make: varmod-match.mk:326: Unfinished character list in pattern "[^-x1-3" of modifier ":M" while evaluating variable "WORDS" with value "- + x xx 0 1 2 3 4 [x1-3" make: varmod-match.mk:340: Unfinished character list in pattern "?[\" of modifier ":M" while evaluating variable "WORDS" with value "\\ \a x\" make: varmod-match.mk:348: Unfinished character range in pattern "[x-" of modifier ":M" while evaluating variable "WORDS" with value "[x- x x- y" make: varmod-match.mk:360: Unfinished character range in pattern "[^x-" of modifier ":M" while evaluating variable "WORDS" with value "[x- x x- y yyyyy" make: varmod-match.mk:367: Unfinished character list in pattern "[" of modifier ":M" while evaluating variable " : :: " with value " : :: " make: varmod-match.mk:367: Unknown modifier ":]" while evaluating variable " : :: " with value "" @ 1.17 log @make: sync comments with reality @ text @d1 9 a9 9 make: "varmod-match.mk" line 289: while evaluating variable "WORDS": warning: Unfinished character list in pattern 'a[' of modifier ':M' make: "varmod-match.mk" line 297: while evaluating variable "WORDS": warning: Unfinished character list in pattern 'a[^' of modifier ':M' make: "varmod-match.mk" line 305: while evaluating variable "WORDS": warning: Unfinished character list in pattern '[-x1-3' of modifier ':M' make: "varmod-match.mk" line 313: while evaluating variable "WORDS": warning: Unfinished character list in pattern '*[-x1-3' of modifier ':M' make: "varmod-match.mk" line 322: while evaluating variable "WORDS": warning: Unfinished character list in pattern '[^-x1-3' of modifier ':M' make: "varmod-match.mk" line 336: while evaluating variable "WORDS": warning: Unfinished character list in pattern '?[\' of modifier ':M' make: "varmod-match.mk" line 344: while evaluating variable "WORDS": warning: Unfinished character range in pattern '[x-' of modifier ':M' make: "varmod-match.mk" line 356: while evaluating variable "WORDS": warning: Unfinished character range in pattern '[^x-' of modifier ':M' make: "varmod-match.mk" line 364: while evaluating variable " : :: ": warning: Unfinished character list in pattern '[' of modifier ':M' @ 1.16 log @make: clean up comments, code and tests @ text @d1 11 a11 11 make: "varmod-match.mk" line 290: while evaluating variable "WORDS": warning: Unfinished character list in pattern 'a[' of modifier ':M' make: "varmod-match.mk" line 298: while evaluating variable "WORDS": warning: Unfinished character list in pattern 'a[^' of modifier ':M' make: "varmod-match.mk" line 306: while evaluating variable "WORDS": warning: Unfinished character list in pattern '[-x1-3' of modifier ':M' make: "varmod-match.mk" line 314: while evaluating variable "WORDS": warning: Unfinished character list in pattern '*[-x1-3' of modifier ':M' make: "varmod-match.mk" line 323: while evaluating variable "WORDS": warning: Unfinished character list in pattern '[^-x1-3' of modifier ':M' make: "varmod-match.mk" line 337: while evaluating variable "WORDS": warning: Unfinished character list in pattern '?[\' of modifier ':M' make: "varmod-match.mk" line 345: while evaluating variable "WORDS": warning: Unfinished character range in pattern '[x-' of modifier ':M' make: "varmod-match.mk" line 357: while evaluating variable "WORDS": warning: Unfinished character range in pattern '[^x-' of modifier ':M' make: "varmod-match.mk" line 365: while evaluating variable " : :: ": warning: Unfinished character list in pattern '[' of modifier ':M' make: "varmod-match.mk" line 365: while evaluating variable " : :: ": Unknown modifier "]" make: "varmod-match.mk" line 365: Malformed conditional (${ ${:U\:} ${:U\:\:} :L:M[:]} != ":") @ 1.15 log @make: provide more context information for parse/evaluate errors @ text @d1 11 a11 11 make: "varmod-match.mk" line 289: while evaluating variable "WORDS": warning: Unfinished character list in pattern 'a[' of modifier ':M' make: "varmod-match.mk" line 297: while evaluating variable "WORDS": warning: Unfinished character list in pattern 'a[^' of modifier ':M' make: "varmod-match.mk" line 305: while evaluating variable "WORDS": warning: Unfinished character list in pattern '[-x1-3' of modifier ':M' make: "varmod-match.mk" line 313: while evaluating variable "WORDS": warning: Unfinished character list in pattern '*[-x1-3' of modifier ':M' make: "varmod-match.mk" line 322: while evaluating variable "WORDS": warning: Unfinished character list in pattern '[^-x1-3' of modifier ':M' make: "varmod-match.mk" line 336: while evaluating variable "WORDS": warning: Unfinished character list in pattern '?[\' of modifier ':M' make: "varmod-match.mk" line 344: while evaluating variable "WORDS": warning: Unfinished character range in pattern '[x-' of modifier ':M' make: "varmod-match.mk" line 356: while evaluating variable "WORDS": warning: Unfinished character range in pattern '[^x-' of modifier ':M' make: "varmod-match.mk" line 364: while evaluating variable " : :: ": warning: Unfinished character list in pattern '[' of modifier ':M' make: "varmod-match.mk" line 364: while evaluating variable " : :: ": Unknown modifier "]" make: "varmod-match.mk" line 364: Malformed conditional (${ ${:U\:} ${:U\:\:} :L:M[:]} != ":") @ 1.14 log @tests/make: test the fast code path for ':M' patterns like '*.c' @ text @d1 10 a10 10 make: "varmod-match.mk" line 289: warning: Unfinished character list in pattern 'a[' of modifier ':M' make: "varmod-match.mk" line 297: warning: Unfinished character list in pattern 'a[^' of modifier ':M' make: "varmod-match.mk" line 305: warning: Unfinished character list in pattern '[-x1-3' of modifier ':M' make: "varmod-match.mk" line 313: warning: Unfinished character list in pattern '*[-x1-3' of modifier ':M' make: "varmod-match.mk" line 322: warning: Unfinished character list in pattern '[^-x1-3' of modifier ':M' make: "varmod-match.mk" line 336: warning: Unfinished character list in pattern '?[\' of modifier ':M' make: "varmod-match.mk" line 344: warning: Unfinished character range in pattern '[x-' of modifier ':M' make: "varmod-match.mk" line 356: warning: Unfinished character range in pattern '[^x-' of modifier ':M' make: "varmod-match.mk" line 364: warning: Unfinished character list in pattern '[' of modifier ':M' make: "varmod-match.mk" line 364: Unknown modifier "]" @ 1.13 log @tests/make: add basic tests for the ':M' modifier @ text @d1 11 a11 11 make: "varmod-match.mk" line 268: warning: Unfinished character list in pattern 'a[' of modifier ':M' make: "varmod-match.mk" line 276: warning: Unfinished character list in pattern 'a[^' of modifier ':M' make: "varmod-match.mk" line 284: warning: Unfinished character list in pattern '[-x1-3' of modifier ':M' make: "varmod-match.mk" line 292: warning: Unfinished character list in pattern '*[-x1-3' of modifier ':M' make: "varmod-match.mk" line 301: warning: Unfinished character list in pattern '[^-x1-3' of modifier ':M' make: "varmod-match.mk" line 315: warning: Unfinished character list in pattern '?[\' of modifier ':M' make: "varmod-match.mk" line 323: warning: Unfinished character range in pattern '[x-' of modifier ':M' make: "varmod-match.mk" line 335: warning: Unfinished character range in pattern '[^x-' of modifier ':M' make: "varmod-match.mk" line 343: warning: Unfinished character list in pattern '[' of modifier ':M' make: "varmod-match.mk" line 343: Unknown modifier "]" make: "varmod-match.mk" line 343: Malformed conditional (${ ${:U\:} ${:U\:\:} :L:M[:]} != ":") @ 1.12 log @tests/make: fix line numbers in expected test output for ':M' @ text @d1 11 a11 11 make: "varmod-match.mk" line 238: warning: Unfinished character list in pattern 'a[' of modifier ':M' make: "varmod-match.mk" line 246: warning: Unfinished character list in pattern 'a[^' of modifier ':M' make: "varmod-match.mk" line 254: warning: Unfinished character list in pattern '[-x1-3' of modifier ':M' make: "varmod-match.mk" line 262: warning: Unfinished character list in pattern '*[-x1-3' of modifier ':M' make: "varmod-match.mk" line 271: warning: Unfinished character list in pattern '[^-x1-3' of modifier ':M' make: "varmod-match.mk" line 285: warning: Unfinished character list in pattern '?[\' of modifier ':M' make: "varmod-match.mk" line 293: warning: Unfinished character range in pattern '[x-' of modifier ':M' make: "varmod-match.mk" line 305: warning: Unfinished character range in pattern '[^x-' of modifier ':M' make: "varmod-match.mk" line 313: warning: Unfinished character list in pattern '[' of modifier ':M' make: "varmod-match.mk" line 313: Unknown modifier "]" make: "varmod-match.mk" line 313: Malformed conditional (${ ${:U\:} ${:U\:\:} :L:M[:]} != ":") @ 1.11 log @tests/make: reorganize tests for the ':M' modifier Add a table of contents. Group the existing tests into sections. Fix the pattern of the test for the malformed ':M[\' modifier, now in line 283. Note that the tests for the pattern characters '*?\' are missing. @ text @d1 11 a11 11 make: "varmod-match.mk" line 236: warning: Unfinished character list in pattern 'a[' of modifier ':M' make: "varmod-match.mk" line 244: warning: Unfinished character list in pattern 'a[^' of modifier ':M' make: "varmod-match.mk" line 252: warning: Unfinished character list in pattern '[-x1-3' of modifier ':M' make: "varmod-match.mk" line 260: warning: Unfinished character list in pattern '*[-x1-3' of modifier ':M' make: "varmod-match.mk" line 269: warning: Unfinished character list in pattern '[^-x1-3' of modifier ':M' make: "varmod-match.mk" line 283: warning: Unfinished character list in pattern '?[\' of modifier ':M' make: "varmod-match.mk" line 291: warning: Unfinished character range in pattern '[x-' of modifier ':M' make: "varmod-match.mk" line 303: warning: Unfinished character range in pattern '[^x-' of modifier ':M' make: "varmod-match.mk" line 311: warning: Unfinished character list in pattern '[' of modifier ':M' make: "varmod-match.mk" line 311: Unknown modifier "]" make: "varmod-match.mk" line 311: Malformed conditional (${ ${:U\:} ${:U\:\:} :L:M[:]} != ":") @ 1.10 log @make: warn about malformed patterns in ':M', ':N' and '.if make(...)' These patterns shouldn't occur in practice, as their results are tricky to predict. Generate a warning for now, and maybe an error later. Reviewed by sjg@@. @ text @d1 11 a11 22 CondParser_Eval: ${NUMBERS:M[A-Z]*} != "One Two Three Four" Comparing "One Two Three Four" != "One Two Three Four" CondParser_Eval: ${NUMBERS:M[^A-Z]*} != "five six seven" Comparing "five six seven" != "five six seven" CondParser_Eval: ${NUMBERS:M[^s]*[ex]} != "One Three five" Comparing "One Three five" != "One Three five" CondParser_Eval: ${:U****************:M****************b} CondParser_Eval: ${:U..................................................b:M*?*?*?*?*?a} CondParser_Eval: ${:Ua \$ sign:M*$$*} != "\$" Comparing "$" != "$" CondParser_Eval: ${:Ua \$ sign any-asterisk:M*\$*} != "any-asterisk" Comparing "any-asterisk" != "any-asterisk" make: "varmod-match.mk" line 162: warning: Unfinished character list in pattern '[' of modifier ':M' make: "varmod-match.mk" line 162: Unknown modifier "]" make: "varmod-match.mk" line 162: Malformed conditional (${ ${:U\:} ${:U\:\:} :L:M[:]} != ":") make: "varmod-match.mk" line 205: warning: Unfinished character list in pattern 'a[' of modifier ':M' make: "varmod-match.mk" line 213: warning: Unfinished character list in pattern 'a[^' of modifier ':M' make: "varmod-match.mk" line 221: warning: Unfinished character list in pattern '[-x1-3' of modifier ':M' make: "varmod-match.mk" line 229: warning: Unfinished character list in pattern '*[-x1-3' of modifier ':M' make: "varmod-match.mk" line 238: warning: Unfinished character list in pattern '[^-x1-3' of modifier ':M' make: "varmod-match.mk" line 258: warning: Unfinished character range in pattern '[x-' of modifier ':M' make: "varmod-match.mk" line 270: warning: Unfinished character range in pattern '[^x-' of modifier ':M' @ 1.9 log @tests/make: fix line numbers in test result, since the previous commit @ text @d13 10 a22 2 make: "varmod-match.mk" line 161: Unknown modifier "]" make: "varmod-match.mk" line 161: Malformed conditional (${ ${:U\:} ${:U\:\:} :L:M[:]} != ":") @ 1.8 log @make: clean up comments related to pattern matching @ text @d13 2 a14 2 make: "varmod-match.mk" line 160: Unknown modifier "]" make: "varmod-match.mk" line 160: Malformed conditional (${ ${:U\:} ${:U\:\:} :L:M[:]} != ":") @ 1.7 log @tests/make: test edge cases in pattern matching @ text @d13 2 a14 2 make: "varmod-match.mk" line 157: Unknown modifier "]" make: "varmod-match.mk" line 157: Malformed conditional (${ ${:U\:} ${:U\:\:} :L:M[:]} != ":") @ 1.6 log @tests/make: demonstrate another pathological pattern match @ text @d13 2 a14 2 make: "varmod-match.mk" line 151: Unknown modifier "]" make: "varmod-match.mk" line 151: Malformed conditional (${ ${:U\:} ${:U\:\:} :L:M[:]} != ":") @ 1.5 log @tests/make: add more comprehensive tests for ':M' and ':N' @ text @d8 1 d13 2 a14 2 make: "varmod-match.mk" line 146: Unknown modifier "]" make: "varmod-match.mk" line 146: Malformed conditional (${ ${:U\:} ${:U\:\:} :L:M[:]} != ":") @ 1.4 log @make: make debug logging for comparisons less technical @ text @d12 5 a16 1 exit status 0 @ 1.3 log @make(1): add test for escaping dollars in the :M variable modifier @ text @d2 1 a2 1 lhs = "One Two Three Four", rhs = "One Two Three Four", op = != d4 1 a4 1 lhs = "five six seven", rhs = "five six seven", op = != d6 1 a6 1 lhs = "One Three five", rhs = "One Three five", op = != d9 1 a9 1 lhs = "$", rhs = "$", op = != d11 1 a11 1 lhs = "any-asterisk", rhs = "any-asterisk", op = != @ 1.2 log @make(1): move tests for the :M modifier into separate files The test for the different escaping has been adjusted to actually show the different parsing results in the test output. To do this, it had to get its own file since it needs the -dv debug flag and specialized post-processing. @ text @d1 11 a11 4 match-char-class: uppercase numbers: One Two Three Four all the others: five six seven starts with non-s, ends with [ex]: One Three five @ 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 4 @