head 1.9; access; symbols netbsd-11-0-RC4:1.9 netbsd-11-0-RC3:1.9 netbsd-11-0-RC2:1.9 netbsd-11-0-RC1:1.9 perseant-exfatfs-base-20250801:1.9 netbsd-11:1.9.0.2 netbsd-11-base:1.9 netbsd-10-1-RELEASE:1.6 perseant-exfatfs-base-20240630:1.7 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.6 netbsd-10-base:1.6 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.9 date 2025.03.30.09.51.50; author rillig; state Exp; branches; next 1.8; commitid veGmSzVhPiW2G4PF; 1.8 date 2024.07.04.20.18.40; author rillig; state Exp; branches; next 1.7; commitid 75IS4XOhTa8VOygF; 1.7 date 2023.06.01.20.56.35; author rillig; state Exp; branches 1.7.2.1; next 1.6; commitid j3tIvMRlxolKQhrE; 1.6 date 2020.12.19.19.49.01; author rillig; state Exp; branches; next 1.5; commitid SOdCIBvwiAIGdoAC; 1.5 date 2020.11.12.19.46.36; author rillig; state Exp; branches; next 1.4; commitid yRnwS5VnqPOVoDvC; 1.4 date 2020.11.12.19.45.24; author rillig; state Exp; branches; next 1.3; commitid JDMv05lTGNCvoDvC; 1.3 date 2020.11.10.22.23.37; author rillig; state Exp; branches; next 1.2; commitid rEzDHOWu9CqSiovC; 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.7.2.1 date 2025.08.02.05.58.33; author perseant; state Exp; branches; next ; commitid 23j6GFaDws3O875G; desc @@ 1.9 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-elif.mk:48: Unknown directive "elsif" make: directive-elif.mk:54: This branch is taken. make: directive-elif.mk:62: Unknown directive "elsif" make: directive-elif.mk:66: This branch is taken. make: directive-elif.mk:73: This branch is taken. make: directive-elif.mk:94: Unknown directive "elsif" make: directive-elif.mk:96: This misspelling is detected. make: directive-elif.mk:98: This branch is taken because of the .else. make: directive-elif.mk:117: What happens on misspelling in a skipped branch? make: directive-elif.mk:128: else make: directive-elif.mk:132: What happens on misspelling in a taken branch? make: directive-elif.mk:135: 1-then make: directive-elif.mk:137: Unknown directive "elsif" make: directive-elif.mk:139: 1-elsif make: directive-elif.mk:141: Unknown directive "elsif" make: directive-elif.mk:143: 2-elsif make: directive-elif.mk:149: if-less elif make: directive-elif.mk:154: warning: extra elif make: Fatal errors encountered -- cannot continue make: stopped making "all" in unit-tests exit status 1 @ 1.8 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 18 a18 18 make: "directive-elif.mk" line 48: Unknown directive "elsif" make: "directive-elif.mk" line 54: This branch is taken. make: "directive-elif.mk" line 62: Unknown directive "elsif" make: "directive-elif.mk" line 66: This branch is taken. make: "directive-elif.mk" line 73: This branch is taken. make: "directive-elif.mk" line 94: Unknown directive "elsif" make: "directive-elif.mk" line 96: This misspelling is detected. make: "directive-elif.mk" line 98: This branch is taken because of the .else. make: "directive-elif.mk" line 117: What happens on misspelling in a skipped branch? make: "directive-elif.mk" line 128: else make: "directive-elif.mk" line 132: What happens on misspelling in a taken branch? make: "directive-elif.mk" line 135: 1-then make: "directive-elif.mk" line 137: Unknown directive "elsif" make: "directive-elif.mk" line 139: 1-elsif make: "directive-elif.mk" line 141: Unknown directive "elsif" make: "directive-elif.mk" line 143: 2-elsif make: "directive-elif.mk" line 149: if-less elif make: "directive-elif.mk" line 154: warning: extra elif @ 1.7 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 @d20 1 a20 1 make: stopped in unit-tests @ 1.7.2.1 log @Sync with HEAD @ text @d1 18 a18 18 make: directive-elif.mk:48: Unknown directive "elsif" make: directive-elif.mk:54: This branch is taken. make: directive-elif.mk:62: Unknown directive "elsif" make: directive-elif.mk:66: This branch is taken. make: directive-elif.mk:73: This branch is taken. make: directive-elif.mk:94: Unknown directive "elsif" make: directive-elif.mk:96: This misspelling is detected. make: directive-elif.mk:98: This branch is taken because of the .else. make: directive-elif.mk:117: What happens on misspelling in a skipped branch? make: directive-elif.mk:128: else make: directive-elif.mk:132: What happens on misspelling in a taken branch? make: directive-elif.mk:135: 1-then make: directive-elif.mk:137: Unknown directive "elsif" make: directive-elif.mk:139: 1-elsif make: directive-elif.mk:141: Unknown directive "elsif" make: directive-elif.mk:143: 2-elsif make: directive-elif.mk:149: if-less elif make: directive-elif.mk:154: warning: extra elif d20 1 a20 1 make: stopped making "all" in unit-tests @ 1.6 log @make(1): rewrite tests for misspelled .elif directive Put the simple tests at the top, demonstrating that there are already some cases in which the misspelled directive is detected. It's not detected though if the surrounding conditional branch is skipped. @ text @d1 18 a18 18 make: "directive-elif.mk" line 47: Unknown directive "elsif" make: "directive-elif.mk" line 52: This branch is taken. make: "directive-elif.mk" line 60: Unknown directive "elsif" make: "directive-elif.mk" line 63: This branch is taken. make: "directive-elif.mk" line 69: This branch is taken. make: "directive-elif.mk" line 89: Unknown directive "elsif" make: "directive-elif.mk" line 90: This misspelling is detected. make: "directive-elif.mk" line 91: This branch is taken because of the .else. make: "directive-elif.mk" line 109: What happens on misspelling in a skipped branch? make: "directive-elif.mk" line 119: else make: "directive-elif.mk" line 122: What happens on misspelling in a taken branch? make: "directive-elif.mk" line 124: 1-then make: "directive-elif.mk" line 125: Unknown directive "elsif" make: "directive-elif.mk" line 126: 1-elsif make: "directive-elif.mk" line 127: Unknown directive "elsif" make: "directive-elif.mk" line 128: 2-elsif make: "directive-elif.mk" line 134: if-less elif make: "directive-elif.mk" line 139: warning: extra elif @ 1.5 log @make(1): move test for missing space after .if to correct file @ text @d1 18 a18 14 make: "directive-elif.mk" line 7: begin .elif misspellings tests, part 1 make: "directive-elif.mk" line 9: 1-then make: "directive-elif.mk" line 18: begin .elif misspellings tests, part 2 make: "directive-elif.mk" line 29: begin .elif misspellings tests, part 3 make: "directive-elif.mk" line 41: which branch is taken on misspelling after false? make: "directive-elif.mk" line 49: else make: "directive-elif.mk" line 52: which branch is taken on misspelling after true? make: "directive-elif.mk" line 54: 1-then make: "directive-elif.mk" line 55: Unknown directive "elsif" make: "directive-elif.mk" line 56: 1-elsif make: "directive-elif.mk" line 57: Unknown directive "elsif" make: "directive-elif.mk" line 58: 2-elsif make: "directive-elif.mk" line 64: if-less elif make: "directive-elif.mk" line 69: warning: extra elif @ 1.4 log @make(1): add test for missing space after .if directive @ text @a14 3 make: "directive-elif.mk" line 75: Don't do this, always put a space after a directive. make: "directive-elif.mk" line 79: Don't do this, always put a space after a directive. make: "directive-elif.mk" line 85: Don't do this, always put a space around comparison operators. @ 1.3 log @make(1): add more tests for parsing .if directives The details of parsing are quite tricky and not documented in the manual page. Record the current behavior to be a little safer in future refactorings. @ text @d15 3 @ 1.2 log @make(1): move tests from directives.mk to separate tests @ text @d13 2 @ 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 15 a15 1 exit status 0 @