head 1.10; access; symbols netbsd-11-0-RC4:1.10 netbsd-11-0-RC3:1.10 netbsd-11-0-RC2:1.10 netbsd-11-0-RC1:1.10 perseant-exfatfs-base-20250801:1.10 netbsd-11:1.10.0.2 netbsd-11-base:1.10 netbsd-10-1-RELEASE:1.7 perseant-exfatfs-base-20240630:1.8 perseant-exfatfs:1.8.0.2 perseant-exfatfs-base:1.8 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.6 cjep_sun2x:1.6.0.4 cjep_sun2x-base:1.6 cjep_staticlib_x-base1:1.6 cjep_staticlib_x:1.6.0.2 cjep_staticlib_x-base:1.6; locks; strict; comment @# @; 1.10 date 2025.03.30.09.51.50; author rillig; state Exp; branches; next 1.9; commitid veGmSzVhPiW2G4PF; 1.9 date 2024.07.04.20.18.40; author rillig; state Exp; branches; next 1.8; commitid 75IS4XOhTa8VOygF; 1.8 date 2023.06.01.20.56.35; author rillig; state Exp; branches 1.8.2.1; next 1.7; commitid j3tIvMRlxolKQhrE; 1.7 date 2022.01.08.20.21.34; author rillig; state Exp; branches; next 1.6; commitid 2srbM2pUaIgw0SnD; 1.6 date 2020.12.19.22.33.11; author rillig; state Exp; branches; next 1.5; commitid 34F1Pdf67eh68pAC; 1.5 date 2020.12.19.12.40.00; author rillig; state Exp; branches; next 1.4; commitid Lu3z2zJN2xPjPlAC; 1.4 date 2020.12.13.01.07.54; author rillig; state Exp; branches; next 1.3; commitid f59P3Vx0FQhPcwzC; 1.3 date 2020.11.15.11.57.00; author rillig; state Exp; branches; next 1.2; commitid doYKgFwWXYdQHYvC; 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.8.2.1 date 2025.08.02.05.58.34; author perseant; state Exp; branches; next ; commitid 23j6GFaDws3O875G; desc @@ 1.10 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-info.mk:12: begin .info tests make: directive-info.mk:14: Unknown directive "inf" make: directive-info.mk:16: Missing argument for ".info" make: directive-info.mk:18: message make: directive-info.mk:20: indented message make: directive-info.mk:22: Unknown directive "information" make: directive-info.mk:24: Unknown directive "information" make: directive-info.mk:30: Missing argument for ".info" make: directive-info.mk:32: Missing argument for ".info" make: directive-info.mk:36: Unknown directive "info-message" make: directive-info.mk:38: no-target: no-source make: directive-info.mk:47: expect line 35 for multi-line message make: Fatal errors encountered -- cannot continue make: stopped making ".info.man" in unit-tests exit status 1 @ 1.9 log @make: on error, print the targets to be made This helps to understand situations with several nested sub-makes in varying directories. @ text @d1 12 a12 12 make: "directive-info.mk" line 12: begin .info tests make: "directive-info.mk" line 14: Unknown directive "inf" make: "directive-info.mk" line 16: Missing argument for ".info" make: "directive-info.mk" line 18: message make: "directive-info.mk" line 20: indented message make: "directive-info.mk" line 22: Unknown directive "information" make: "directive-info.mk" line 24: Unknown directive "information" make: "directive-info.mk" line 30: Missing argument for ".info" make: "directive-info.mk" line 32: Missing argument for ".info" make: "directive-info.mk" line 36: Unknown directive "info-message" make: "directive-info.mk" line 38: no-target: no-source make: "directive-info.mk" line 47: expect line 35 for multi-line message @ 1.8 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 @d14 1 a14 1 make: stopped in unit-tests @ 1.8.2.1 log @Sync with HEAD @ text @d1 12 a12 12 make: directive-info.mk:12: begin .info tests make: directive-info.mk:14: Unknown directive "inf" make: directive-info.mk:16: Missing argument for ".info" make: directive-info.mk:18: message make: directive-info.mk:20: indented message make: directive-info.mk:22: Unknown directive "information" make: directive-info.mk:24: Unknown directive "information" make: directive-info.mk:30: Missing argument for ".info" make: directive-info.mk:32: Missing argument for ".info" make: directive-info.mk:36: Unknown directive "info-message" make: directive-info.mk:38: no-target: no-source make: directive-info.mk:47: expect line 35 for multi-line message d14 1 a14 1 make: stopped making ".info.man" in unit-tests @ 1.7 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 12 a12 12 make: "directive-info.mk" line 11: begin .info tests make: "directive-info.mk" line 12: Unknown directive "inf" make: "directive-info.mk" line 13: Missing argument for ".info" make: "directive-info.mk" line 14: message make: "directive-info.mk" line 15: indented message make: "directive-info.mk" line 16: Unknown directive "information" make: "directive-info.mk" line 17: Unknown directive "information" make: "directive-info.mk" line 22: Missing argument for ".info" make: "directive-info.mk" line 23: Missing argument for ".info" make: "directive-info.mk" line 26: Unknown directive "info-message" make: "directive-info.mk" line 27: no-target: no-source make: "directive-info.mk" line 35: expect line 35 for multi-line message @ 1.6 log @make(1): fix error message for .info/.warning/.error without argument Previously, the error message was "Unknown directive", which was obviously wrong. The new error message is "Missing argument". @ text @d12 1 a12 1 make: "directive-info.mk" line 36: expect line 30 for multi-line message @ 1.5 log @make(1): add test for backslash continuation lines in .for loops This ensures that the line numbers for messages are the expected onces in .for loops. While experimenting with the backslash continuation lines, I noticed that the reported line numbers for these are based on the number of completely parsed physical lines, which nicely cancels out the + 1 that has to be added for producing human-readable 1-based line numbers. It would be more correct to report the parse errors on the first affected line. @ text @d1 12 a12 12 make: "directive-info.mk" line 7: begin .info tests make: "directive-info.mk" line 8: Unknown directive "inf" make: "directive-info.mk" line 9: Unknown directive "info" make: "directive-info.mk" line 10: message make: "directive-info.mk" line 11: indented message make: "directive-info.mk" line 12: Unknown directive "information" make: "directive-info.mk" line 13: Unknown directive "information" make: "directive-info.mk" line 18: Unknown directive "info" make: "directive-info.mk" line 19: Unknown directive "info" make: "directive-info.mk" line 22: Unknown directive "info-message" make: "directive-info.mk" line 23: no-target: no-source make: "directive-info.mk" line 32: expect line 30 for multi-line message @ 1.4 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 @d12 1 @ 1.3 log @make(1): add tests for edge cases when parsing directives @ text @d7 1 a7 1 make: "directive-info.mk" line 13: message @ 1.2 log @make(1): move tests from directives.mk to separate tests @ text @d8 4 @ 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 10 a10 1 exit status 0 @