head 1.15; access; symbols netbsd-10-2-RELEASE:1.8 netbsd-11-0-RELEASE:1.15 netbsd-11-0-RC7:1.15 netbsd-11-0-RC6:1.15 netbsd-11-0-RC5:1.15 netbsd-11-0-RC4:1.15 netbsd-11-0-RC3:1.15 netbsd-11-0-RC2:1.15 netbsd-11-0-RC1:1.15 perseant-exfatfs-base-20250801:1.15 netbsd-11:1.15.0.2 netbsd-11-base:1.15 netbsd-10-1-RELEASE:1.8 perseant-exfatfs-base-20240630:1.10 perseant-exfatfs:1.10.0.2 perseant-exfatfs-base:1.10 netbsd-10-0-RELEASE:1.8 netbsd-10-0-RC6:1.8 netbsd-10-0-RC5:1.8 netbsd-10-0-RC4:1.8 netbsd-10-0-RC3:1.8 netbsd-10-0-RC2:1.8 netbsd-10-0-RC1:1.8 netbsd-10:1.8.0.2 netbsd-10-base:1.8 cjep_sun2x-base1:1.7 cjep_sun2x:1.7.0.4 cjep_sun2x-base:1.7 cjep_staticlib_x-base1:1.7 cjep_staticlib_x:1.7.0.2 cjep_staticlib_x-base:1.7; locks; strict; comment @# @; 1.15 date 2025.03.30.09.51.50; author rillig; state Exp; branches; next 1.14; commitid veGmSzVhPiW2G4PF; 1.14 date 2025.03.29.19.08.52; author rillig; state Exp; branches; next 1.13; commitid y95n9TsA04p0PZOF; 1.13 date 2024.08.29.20.20.36; author rillig; state Exp; branches; next 1.12; commitid EaMgk7FrF8mB1LnF; 1.12 date 2024.07.04.20.18.40; author rillig; state Exp; branches; next 1.11; commitid 75IS4XOhTa8VOygF; 1.11 date 2024.07.04.17.47.54; author rillig; state Exp; branches; next 1.10; commitid mjDGVMgldk7QYxgF; 1.10 date 2024.04.20.10.18.55; author rillig; state Exp; branches 1.10.2.1; next 1.9; commitid 2fCjOO5HMlf2VR6F; 1.9 date 2023.06.01.20.56.35; author rillig; state Exp; branches; next 1.8; commitid j3tIvMRlxolKQhrE; 1.8 date 2022.01.08.20.21.34; author rillig; state Exp; branches; next 1.7; commitid 2srbM2pUaIgw0SnD; 1.7 date 2021.02.23.15.19.41; author rillig; state Exp; branches; next 1.6; commitid wGJlKlrQTIQeBQIC; 1.6 date 2021.02.16.18.02.19; author rillig; state Exp; branches; next 1.5; commitid LZ6fR4c7ot7IJXHC; 1.5 date 2020.12.22.20.10.21; author rillig; state Exp; branches; next 1.4; commitid 8yStr5Yo6WKIeMAC; 1.4 date 2020.12.19.22.10.18; author rillig; state Exp; branches; next 1.3; commitid TTktMknL0LFk0pAC; 1.3 date 2020.12.13.01.07.54; author rillig; state Exp; branches; next 1.2; commitid f59P3Vx0FQhPcwzC; 1.2 date 2020.11.03.17.17.31; author rillig; state Exp; branches; next 1.1; commitid x9asRQJBHhqCRsuC; 1.1 date 2020.08.16.12.07.51; author rillig; state Exp; branches; next ; commitid coEgPk3hgfeYGhkC; 1.10.2.1 date 2025.08.02.05.58.34; author perseant; state Exp; branches; next ; commitid 23j6GFaDws3O875G; desc @@ 1.15 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 @make: directive-undef.mk:30: The .undef directive requires an argument make: directive-undef.mk:88: Unknown modifier ":Z" while evaluating variable "VARNAMES" with value "VARNAMES" make: directive-undef.mk:105: warning: UT_EXPORTED is still listed in .MAKE.EXPORTED even though spaceit is not exported anymore. make: Fatal errors encountered -- cannot continue make: stopped making "all" in unit-tests exit status 1 @ 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 @d1 2 a2 2 make: "directive-undef.mk" line 30: The .undef directive requires an argument make: "directive-undef.mk" line 88: Unknown modifier ":Z" d4 1 a4 1 make: "directive-undef.mk" line 105: warning: UT_EXPORTED is still listed in .MAKE.EXPORTED even though spaceit is not exported anymore. @ 1.13 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 @d2 1 a2 1 make: "directive-undef.mk" line 88: Unknown modifier "Z" @ 1.12 log @make: on error, print the targets to be made This helps to understand situations with several nested sub-makes in varying directories. @ text @d2 2 a3 1 make: "directive-undef.mk" line 88: while evaluating variable "VARNAMES" with value "VARNAMES": Unknown modifier "Z" @ 1.11 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 @d5 1 a5 1 make: stopped in unit-tests @ 1.10 log @make: provide more context information for parse/evaluate errors @ text @d2 1 a2 1 make: "directive-undef.mk" line 88: while evaluating variable "VARNAMES": Unknown modifier "Z" @ 1.10.2.1 log @Sync with HEAD @ text @d1 3 a3 4 make: directive-undef.mk:30: The .undef directive requires an argument make: directive-undef.mk:88: Unknown modifier ":Z" while evaluating variable "VARNAMES" with value "VARNAMES" make: directive-undef.mk:105: warning: UT_EXPORTED is still listed in .MAKE.EXPORTED even though spaceit is not exported anymore. d5 1 a5 1 make: stopped making "all" in unit-tests @ 1.9 log @tests/make: force line-based diagnostics to be listed in the tests This way, contradictions between the intended output and the actual output are closer together and have a better chance of being spotted. @ text @d2 1 a2 1 make: "directive-undef.mk" line 88: Unknown modifier "Z" @ 1.8 log @make: fix reported line numbers of continuation lines (since 2002) Previously, multi-line directives like '.info' or '.error' reported the line number of their last line instead of their first line, which is more usual. This also affected the debug log from '-dp'. @ text @d1 3 a3 3 make: "directive-undef.mk" line 29: The .undef directive requires an argument make: "directive-undef.mk" line 86: Unknown modifier "Z" make: "directive-undef.mk" line 102: warning: UT_EXPORTED is still listed in .MAKE.EXPORTED even though spaceit is not exported anymore. @ 1.7 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 @d3 1 a3 1 make: "directive-undef.mk" line 103: warning: UT_EXPORTED is still listed in .MAKE.EXPORTED even though spaceit is not exported anymore. @ 1.6 log @make: demonstrate inconsistency in .undef of an exported variable @ text @d2 1 a2 1 make: "directive-undef.mk" line 86: Unknown modifier 'Z' @ 1.5 log @make(1): allow .undef to undefine multiple variables at once Since make doesn't support variable names containing spaces, this edge case is not enough reason to stop this feature. Having multiple variable names as arguments nicely aligns with other directives such as .for and .export. @ text @d3 1 @ 1.4 log @make(1): error out if .undef has not exactly 1 argument @ text @d1 2 a2 2 make: "directive-undef.mk" line 14: The .undef directive requires exactly 1 argument make: "directive-undef.mk" line 24: The .undef directive requires exactly 1 argument @ 1.3 log @make(1): error out on misspelled directives Before, make accepted misspellings like .warnings, .export-literally and a few others, all of which are unlikely to occur in practice. See the test directive-misspellings.mk for further details. @ text @d1 5 a5 1 exit status 0 @ 1.2 log @make(1): move tests from directives.mk to separate tests @ text @d1 1 a1 4 make: "directive-undef.mk" line 16: Unknown directive "unde" make: Fatal errors encountered -- cannot continue make: stopped in unit-tests exit status 1 @ 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 a4 1 exit status 0 @