Module Name: src Committed By: rillig Date: Sun Nov 19 22:06:15 UTC 2023
Modified Files: src/usr.bin/make: suff.c var.c src/usr.bin/make/unit-tests: cmd-errors-jobs.exp cmd-errors-lint.exp cmd-errors.exp dep-var.exp directive-for-escape.exp moderrs.exp varmisc.exp varmod-edge.exp varmod-edge.mk varmod-order.exp varparse-errors.exp Log Message: make: replace 'variable expression' with 'expression' in diagnostics To generate a diff of this commit: cvs rdiff -u -r1.368 -r1.369 src/usr.bin/make/suff.c cvs rdiff -u -r1.1073 -r1.1074 src/usr.bin/make/var.c cvs rdiff -u -r1.3 -r1.4 src/usr.bin/make/unit-tests/cmd-errors-jobs.exp \ src/usr.bin/make/unit-tests/cmd-errors-lint.exp cvs rdiff -u -r1.6 -r1.7 src/usr.bin/make/unit-tests/cmd-errors.exp cvs rdiff -u -r1.5 -r1.6 src/usr.bin/make/unit-tests/dep-var.exp cvs rdiff -u -r1.22 -r1.23 \ src/usr.bin/make/unit-tests/directive-for-escape.exp cvs rdiff -u -r1.32 -r1.33 src/usr.bin/make/unit-tests/moderrs.exp cvs rdiff -u -r1.18 -r1.19 src/usr.bin/make/unit-tests/varmisc.exp \ src/usr.bin/make/unit-tests/varmod-edge.mk cvs rdiff -u -r1.15 -r1.16 src/usr.bin/make/unit-tests/varmod-edge.exp cvs rdiff -u -r1.8 -r1.9 src/usr.bin/make/unit-tests/varmod-order.exp cvs rdiff -u -r1.9 -r1.10 src/usr.bin/make/unit-tests/varparse-errors.exp Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/usr.bin/make/suff.c diff -u src/usr.bin/make/suff.c:1.368 src/usr.bin/make/suff.c:1.369 --- src/usr.bin/make/suff.c:1.368 Tue Feb 14 21:38:31 2023 +++ src/usr.bin/make/suff.c Sun Nov 19 22:06:15 2023 @@ -1,4 +1,4 @@ -/* $NetBSD: suff.c,v 1.368 2023/02/14 21:38:31 rillig Exp $ */ +/* $NetBSD: suff.c,v 1.369 2023/11/19 22:06:15 rillig Exp $ */ /* * Copyright (c) 1988, 1989, 1990, 1993 @@ -115,7 +115,7 @@ #include "dir.h" /* "@(#)suff.c 8.4 (Berkeley) 3/21/94" */ -MAKE_RCSID("$NetBSD: suff.c,v 1.368 2023/02/14 21:38:31 rillig Exp $"); +MAKE_RCSID("$NetBSD: suff.c,v 1.369 2023/11/19 22:06:15 rillig Exp $"); typedef List SuffixList; typedef ListNode SuffixListNode; @@ -1316,7 +1316,7 @@ ExpandChildrenRegular(char *cp, GNode *p /* TODO: handle errors */ if (junk.str == var_Error) { Parse_Error(PARSE_FATAL, - "Malformed variable expression at \"%s\"", + "Malformed expression at \"%s\"", cp); cp++; } else { Index: src/usr.bin/make/var.c diff -u src/usr.bin/make/var.c:1.1073 src/usr.bin/make/var.c:1.1074 --- src/usr.bin/make/var.c:1.1073 Sun Nov 19 12:11:34 2023 +++ src/usr.bin/make/var.c Sun Nov 19 22:06:15 2023 @@ -1,4 +1,4 @@ -/* $NetBSD: var.c,v 1.1073 2023/11/19 12:11:34 rillig Exp $ */ +/* $NetBSD: var.c,v 1.1074 2023/11/19 22:06:15 rillig Exp $ */ /* * Copyright (c) 1988, 1989, 1990, 1993 @@ -139,7 +139,7 @@ #include "metachar.h" /* "@(#)var.c 8.3 (Berkeley) 3/19/94" */ -MAKE_RCSID("$NetBSD: var.c,v 1.1073 2023/11/19 12:11:34 rillig Exp $"); +MAKE_RCSID("$NetBSD: var.c,v 1.1074 2023/11/19 22:06:15 rillig Exp $"); /* * Variables are defined using one of the VAR=value assignments. Their @@ -3972,8 +3972,8 @@ ApplyModifiersIndirect(ModChain *ch, con if (*p == ':') p++; else if (*p == '\0' && ch->endc != '\0') { - Error("Unclosed variable expression after indirect " - "modifier, expecting '%c' for variable \"%s\"", + Error("Unclosed expression after indirect modifier, " + "expecting '%c' for variable \"%s\"", ch->endc, expr->name); *pp = p; return AMIR_OUT; @@ -4025,7 +4025,7 @@ ApplySingleModifier(const char **pp, Mod if (*p == '\0' && ch->endc != '\0') { Error( - "Unclosed variable expression, expecting '%c' for " + "Unclosed expression, expecting '%c' for " "modifier \"%.*s\" of variable \"%s\" with value \"%s\"", ch->endc, (int)(p - mod), mod, @@ -4083,7 +4083,7 @@ ApplyModifiers( if (*p == '\0' && endc != '\0') { Error( - "Unclosed variable expression (expecting '%c') for \"%s\"", + "Unclosed expression, expecting '%c' for \"%s\"", ch.endc, expr->name); goto cleanup; } Index: src/usr.bin/make/unit-tests/cmd-errors-jobs.exp diff -u src/usr.bin/make/unit-tests/cmd-errors-jobs.exp:1.3 src/usr.bin/make/unit-tests/cmd-errors-jobs.exp:1.4 --- src/usr.bin/make/unit-tests/cmd-errors-jobs.exp:1.3 Sun Sep 25 12:51:37 2022 +++ src/usr.bin/make/unit-tests/cmd-errors-jobs.exp Sun Nov 19 22:06:15 2023 @@ -1,7 +1,7 @@ : undefined--eol make: Unclosed variable "UNCLOSED" : unclosed-variable- -make: Unclosed variable expression (expecting '}') for "UNCLOSED" +make: Unclosed expression, expecting '}' for "UNCLOSED" : unclosed-modifier- make: Unknown modifier "Z" : unknown-modifier--eol Index: src/usr.bin/make/unit-tests/cmd-errors-lint.exp diff -u src/usr.bin/make/unit-tests/cmd-errors-lint.exp:1.3 src/usr.bin/make/unit-tests/cmd-errors-lint.exp:1.4 --- src/usr.bin/make/unit-tests/cmd-errors-lint.exp:1.3 Tue Feb 23 15:19:41 2021 +++ src/usr.bin/make/unit-tests/cmd-errors-lint.exp Sun Nov 19 22:06:15 2023 @@ -1,7 +1,7 @@ : undefined make: Unclosed variable "UNCLOSED" : unclosed-variable -make: Unclosed variable expression (expecting '}') for "UNCLOSED" +make: Unclosed expression, expecting '}' for "UNCLOSED" : unclosed-modifier make: Unknown modifier "Z" : unknown-modifier Index: src/usr.bin/make/unit-tests/cmd-errors.exp diff -u src/usr.bin/make/unit-tests/cmd-errors.exp:1.6 src/usr.bin/make/unit-tests/cmd-errors.exp:1.7 --- src/usr.bin/make/unit-tests/cmd-errors.exp:1.6 Sun Sep 25 12:51:37 2022 +++ src/usr.bin/make/unit-tests/cmd-errors.exp Sun Nov 19 22:06:15 2023 @@ -1,7 +1,7 @@ : undefined--eol make: Unclosed variable "UNCLOSED" : unclosed-variable- -make: Unclosed variable expression (expecting '}') for "UNCLOSED" +make: Unclosed expression, expecting '}' for "UNCLOSED" : unclosed-modifier- make: Unknown modifier "Z" : unknown-modifier--eol Index: src/usr.bin/make/unit-tests/dep-var.exp diff -u src/usr.bin/make/unit-tests/dep-var.exp:1.5 src/usr.bin/make/unit-tests/dep-var.exp:1.6 --- src/usr.bin/make/unit-tests/dep-var.exp:1.5 Mon Feb 13 21:01:46 2023 +++ src/usr.bin/make/unit-tests/dep-var.exp Sun Nov 19 22:06:15 2023 @@ -22,7 +22,7 @@ Var_Parse: $): (parse-only) Global: .ALLTARGETS = all ${DEF2} a-${DEF2}-b ${UNDEF3} 1-${INDIRECT_1}-1 $$) undef1 def2 a-def2-b 1-2-$INDIRECT_2-2-1 $) Global: .MAKEFLAGS = -r -k -d v -d Global: .MAKEFLAGS = -r -k -d v -d 0 -make: Malformed variable expression at "$)" +make: Malformed expression at "$)" def2 a-def2-b 1-2-NDIRECT_2-2-1 Index: src/usr.bin/make/unit-tests/directive-for-escape.exp diff -u src/usr.bin/make/unit-tests/directive-for-escape.exp:1.22 src/usr.bin/make/unit-tests/directive-for-escape.exp:1.23 --- src/usr.bin/make/unit-tests/directive-for-escape.exp:1.22 Fri Jun 23 06:11:06 2023 +++ src/usr.bin/make/unit-tests/directive-for-escape.exp Sun Nov 19 22:06:15 2023 @@ -1,12 +1,12 @@ For: end for 1 For: loop body with chars = !"#$%&'()*+,-./0-9:;<=>?@A-Z[\]_^a-z{|}~: . info ${:U!"#$%&'()*+,-./0-9\:;<=>?@A-Z[\\]_^a-z{|\}~} -make: Unclosed variable expression, expecting '}' for modifier "U!"" of variable "" with value "!"" +make: Unclosed expression, expecting '}' for modifier "U!"" of variable "" with value "!"" make: "directive-for-escape.mk" line 19: !" For: end for 1 For: loop body with chars = !"\\#$%&'()*+,-./0-9:;<=>?@A-Z[\]_^a-z{|}~: . info ${:U!"\\\\#$%&'()*+,-./0-9\:;<=>?@A-Z[\\]_^a-z{|\}~} -make: Unclosed variable expression, expecting '}' for modifier "U!"\\\\" of variable "" with value "!"\\" +make: Unclosed expression, expecting '}' for modifier "U!"\\\\" of variable "" with value "!"\\" make: "directive-for-escape.mk" line 30: !"\\ For: end for 1 For: loop body with i = $: Index: src/usr.bin/make/unit-tests/moderrs.exp diff -u src/usr.bin/make/unit-tests/moderrs.exp:1.32 src/usr.bin/make/unit-tests/moderrs.exp:1.33 --- src/usr.bin/make/unit-tests/moderrs.exp:1.32 Mon Jun 21 08:28:37 2021 +++ src/usr.bin/make/unit-tests/moderrs.exp Sun Nov 19 22:06:15 2023 @@ -10,12 +10,12 @@ VAR:Z=before-inner}-after unclosed-direct: want: Unclosed variable expression, expecting '}' for modifier "S,V,v," of variable "VAR" with value "Thevariable" -make: Unclosed variable expression, expecting '}' for modifier "S,V,v," of variable "VAR" with value "Thevariable" +make: Unclosed expression, expecting '}' for modifier "S,V,v," of variable "VAR" with value "Thevariable" VAR:S,V,v,=Thevariable unclosed-indirect: want: Unclosed variable expression after indirect modifier, expecting '}' for variable "VAR" -make: Unclosed variable expression after indirect modifier, expecting '}' for variable "VAR" +make: Unclosed expression after indirect modifier, expecting '}' for variable "VAR" VAR:S,V,v,=Thevariable unfinished-indirect: @@ -33,7 +33,7 @@ make: Unfinished modifier for "UNDEF" (' 1 2 3 loop-close: -make: Unclosed variable expression, expecting '}' for modifier "@var@${var}}...@" of variable "UNDEF" with value "1}... 2}... 3}..." +make: Unclosed expression, expecting '}' for modifier "@var@${var}}...@" of variable "UNDEF" with value "1}... 2}... 3}..." 1}... 2}... 3}... 1}... 2}... 3}... @@ -67,7 +67,7 @@ make: Unfinished modifier for "VAR" (',' 4: make: Unfinished modifier for "VAR" (',' missing) 5: -make: Unclosed variable expression, expecting '}' for modifier "S,from,to," of variable "VAR" with value "TheVariable" +make: Unclosed expression, expecting '}' for modifier "S,from,to," of variable "VAR" with value "TheVariable" 6: TheVariable 7: TheVariable @@ -82,7 +82,7 @@ make: Unfinished modifier for "VAR" (',' 4: make: Unfinished modifier for "VAR" (',' missing) 5: -make: Unclosed variable expression, expecting '}' for modifier "C,from,to," of variable "VAR" with value "TheVariable" +make: Unclosed expression, expecting '}' for modifier "C,from,to," of variable "VAR" with value "TheVariable" 6: TheVariable 7: TheVariable @@ -124,13 +124,13 @@ make: Unknown modifier "__" mod-sysv-parse: make: Unknown modifier "3" -make: Unclosed variable expression, expecting '}' for modifier "3" of variable "FIB" with value "" +make: Unclosed expression, expecting '}' for modifier "3" of variable "FIB" with value "" make: Unknown modifier "3=" -make: Unclosed variable expression, expecting '}' for modifier "3=" of variable "FIB" with value "" +make: Unclosed expression, expecting '}' for modifier "3=" of variable "FIB" with value "" make: Unknown modifier "3=x3" -make: Unclosed variable expression, expecting '}' for modifier "3=x3" of variable "FIB" with value "" +make: Unclosed expression, expecting '}' for modifier "3=x3" of variable "FIB" with value "" 1 1 2 x3 5 8 1x3 21 34 Index: src/usr.bin/make/unit-tests/varmisc.exp diff -u src/usr.bin/make/unit-tests/varmisc.exp:1.18 src/usr.bin/make/unit-tests/varmisc.exp:1.19 --- src/usr.bin/make/unit-tests/varmisc.exp:1.18 Thu Oct 19 18:24:33 2023 +++ src/usr.bin/make/unit-tests/varmisc.exp Sun Nov 19 22:06:15 2023 @@ -51,7 +51,7 @@ make: Unclosed variable "UNCLOSED" make: Unclosed variable "UNCLOSED" make: Unclosed variable "PATTERN" -make: Unclosed variable expression, expecting '}' for modifier "M${PATTERN" of variable "UNCLOSED" with value "" +make: Unclosed expression, expecting '}' for modifier "M${PATTERN" of variable "UNCLOSED" with value "" make: Unclosed variable "param" make: Unclosed variable "UNCLOSED." Index: src/usr.bin/make/unit-tests/varmod-edge.mk diff -u src/usr.bin/make/unit-tests/varmod-edge.mk:1.18 src/usr.bin/make/unit-tests/varmod-edge.mk:1.19 --- src/usr.bin/make/unit-tests/varmod-edge.mk:1.18 Sun Nov 19 21:47:52 2023 +++ src/usr.bin/make/unit-tests/varmod-edge.mk Sun Nov 19 22:06:15 2023 @@ -1,4 +1,4 @@ -# $NetBSD: varmod-edge.mk,v 1.18 2023/11/19 21:47:52 rillig Exp $ +# $NetBSD: varmod-edge.mk,v 1.19 2023/11/19 22:06:15 rillig Exp $ # # Tests for edge cases in variable modifiers. # @@ -51,7 +51,7 @@ TESTS+= M-nest-mix INP.M-nest-mix= (parentheses) MOD.M-nest-mix= ${INP.M-nest-mix:M${:U*)}} EXP.M-nest-mix= (parentheses)} -# make: Unclosed variable expression, expecting '}' for modifier "U*)" of variable "" with value "*)" +# make: Unclosed expression, expecting '}' for modifier "U*)" of variable "" with value "*)" # In contrast to parentheses and braces, the brackets are not counted # when the :M modifier is parsed since Makefile variables only take the Index: src/usr.bin/make/unit-tests/varmod-edge.exp diff -u src/usr.bin/make/unit-tests/varmod-edge.exp:1.15 src/usr.bin/make/unit-tests/varmod-edge.exp:1.16 --- src/usr.bin/make/unit-tests/varmod-edge.exp:1.15 Thu Jun 1 20:56:35 2023 +++ src/usr.bin/make/unit-tests/varmod-edge.exp Sun Nov 19 22:06:15 2023 @@ -1,7 +1,7 @@ make: "varmod-edge.mk" line 184: ok M-paren make: "varmod-edge.mk" line 184: ok M-mixed make: "varmod-edge.mk" line 184: ok M-unescape -make: Unclosed variable expression, expecting '}' for modifier "U*)" of variable "" with value "*)" +make: Unclosed expression, expecting '}' for modifier "U*)" of variable "" with value "*)" make: "varmod-edge.mk" line 184: ok M-nest-mix make: "varmod-edge.mk" line 184: ok M-nest-brk make: "varmod-edge.mk" line 184: ok M-pat-err Index: src/usr.bin/make/unit-tests/varmod-order.exp diff -u src/usr.bin/make/unit-tests/varmod-order.exp:1.8 src/usr.bin/make/unit-tests/varmod-order.exp:1.9 --- src/usr.bin/make/unit-tests/varmod-order.exp:1.8 Thu Jun 1 20:56:35 2023 +++ src/usr.bin/make/unit-tests/varmod-order.exp Sun Nov 19 22:06:15 2023 @@ -2,9 +2,9 @@ make: Bad modifier ":OX" for variable "W make: "varmod-order.mk" line 16: Undefined variable "${WORDS:OX" make: Bad modifier ":OxXX" for variable "WORDS" make: "varmod-order.mk" line 21: Undefined variable "${WORDS:Ox" -make: Unclosed variable expression, expecting '}' for modifier "O" of variable "WORDS" with value "eight five four nine one seven six ten three two" -make: Unclosed variable expression, expecting '}' for modifier "On" of variable "NUMBERS" with value "1 2 3 4 5 6 7 8 9 10" -make: Unclosed variable expression, expecting '}' for modifier "Onr" of variable "NUMBERS" with value "10 9 8 7 6 5 4 3 2 1" +make: Unclosed expression, expecting '}' for modifier "O" of variable "WORDS" with value "eight five four nine one seven six ten three two" +make: Unclosed expression, expecting '}' for modifier "On" of variable "NUMBERS" with value "1 2 3 4 5 6 7 8 9 10" +make: Unclosed expression, expecting '}' for modifier "Onr" of variable "NUMBERS" with value "10 9 8 7 6 5 4 3 2 1" make: Bad modifier ":Oxn" for variable "NUMBERS" make: "varmod-order.mk" line 33: Malformed conditional (${NUMBERS:Oxn}) make: Bad modifier ":On_typo" for variable "NUMBERS" Index: src/usr.bin/make/unit-tests/varparse-errors.exp diff -u src/usr.bin/make/unit-tests/varparse-errors.exp:1.9 src/usr.bin/make/unit-tests/varparse-errors.exp:1.10 --- src/usr.bin/make/unit-tests/varparse-errors.exp:1.9 Thu Jun 1 20:56:35 2023 +++ src/usr.bin/make/unit-tests/varparse-errors.exp Sun Nov 19 22:06:15 2023 @@ -6,20 +6,20 @@ make: Bad modifier ":OX" for variable "" make: Bad modifier ":OX" for variable "" make: "varparse-errors.mk" line 71: Undefined variable "${:U:OX" make: Bad modifier ":OX" for variable "" -make: Unclosed variable expression, expecting '}' for modifier "Q" of variable "" with value "" -make: Unclosed variable expression, expecting '}' for modifier "sh" of variable "" with value "" -make: Unclosed variable expression, expecting '}' for modifier "tA" of variable "" with value "" -make: Unclosed variable expression, expecting '}' for modifier "tsX" of variable "" with value "" -make: Unclosed variable expression, expecting '}' for modifier "ts" of variable "" with value "" -make: Unclosed variable expression, expecting '}' for modifier "ts\040" of variable "" with value "" -make: Unclosed variable expression, expecting '}' for modifier "u" of variable "" with value "" -make: Unclosed variable expression, expecting '}' for modifier "H" of variable "" with value "." -make: Unclosed variable expression, expecting '}' for modifier "[1]" of variable "" with value "" -make: Unclosed variable expression, expecting '}' for modifier "hash" of variable "" with value "b2af338b" -make: Unclosed variable expression, expecting '}' for modifier "range" of variable "" with value "1" -make: Unclosed variable expression, expecting '}' for modifier "_" of variable "" with value "" -make: Unclosed variable expression, expecting '}' for modifier "gmtime" of variable "" with value "<timestamp>" -make: Unclosed variable expression, expecting '}' for modifier "localtime" of variable "" with value "<timestamp>" +make: Unclosed expression, expecting '}' for modifier "Q" of variable "" with value "" +make: Unclosed expression, expecting '}' for modifier "sh" of variable "" with value "" +make: Unclosed expression, expecting '}' for modifier "tA" of variable "" with value "" +make: Unclosed expression, expecting '}' for modifier "tsX" of variable "" with value "" +make: Unclosed expression, expecting '}' for modifier "ts" of variable "" with value "" +make: Unclosed expression, expecting '}' for modifier "ts\040" of variable "" with value "" +make: Unclosed expression, expecting '}' for modifier "u" of variable "" with value "" +make: Unclosed expression, expecting '}' for modifier "H" of variable "" with value "." +make: Unclosed expression, expecting '}' for modifier "[1]" of variable "" with value "" +make: Unclosed expression, expecting '}' for modifier "hash" of variable "" with value "b2af338b" +make: Unclosed expression, expecting '}' for modifier "range" of variable "" with value "1" +make: Unclosed expression, expecting '}' for modifier "_" of variable "" with value "" +make: Unclosed expression, expecting '}' for modifier "gmtime" of variable "" with value "<timestamp>" +make: Unclosed expression, expecting '}' for modifier "localtime" of variable "" with value "<timestamp>" make: Fatal errors encountered -- cannot continue make: stopped in unit-tests exit status 1