Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/usr.bin/make make: add context information to error message ...



details:   https://anonhg.NetBSD.org/src/rev/26a0a75aa70b
branches:  trunk
changeset: 952990:26a0a75aa70b
user:      rillig <rillig%NetBSD.org@localhost>
date:      Tue Feb 23 00:15:22 2021 +0000

description:
make: add context information to error message about ':range' modifier

diffstat:

 usr.bin/make/unit-tests/varmod-range.exp |  2 +-
 usr.bin/make/var.c                       |  7 ++++---
 2 files changed, 5 insertions(+), 4 deletions(-)

diffs (37 lines):

diff -r 41ee0e3cb49d -r 26a0a75aa70b usr.bin/make/unit-tests/varmod-range.exp
--- a/usr.bin/make/unit-tests/varmod-range.exp  Tue Feb 23 00:11:07 2021 +0000
+++ b/usr.bin/make/unit-tests/varmod-range.exp  Tue Feb 23 00:15:22 2021 +0000
@@ -1,4 +1,4 @@
-make: "varmod-range.mk" line 53: Invalid number: x}Rest" != "Rest"
+make: "varmod-range.mk" line 53: Invalid number "x}Rest" != "Rest"" for ':range' modifier
 make: "varmod-range.mk" line 53: Malformed conditional ("${:U:range=x}Rest" != "Rest")
 make: "varmod-range.mk" line 62: Unknown modifier 'x'
 make: "varmod-range.mk" line 62: Malformed conditional ("${:U:range=0x0}Rest" != "Rest")
diff -r 41ee0e3cb49d -r 26a0a75aa70b usr.bin/make/var.c
--- a/usr.bin/make/var.c        Tue Feb 23 00:11:07 2021 +0000
+++ b/usr.bin/make/var.c        Tue Feb 23 00:15:22 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: var.c,v 1.843 2021/02/23 00:11:07 rillig Exp $ */
+/*     $NetBSD: var.c,v 1.844 2021/02/23 00:15:22 rillig Exp $ */
 
 /*
  * Copyright (c) 1988, 1989, 1990, 1993
@@ -140,7 +140,7 @@
 #include "metachar.h"
 
 /*     "@(#)var.c      8.3 (Berkeley) 3/19/94" */
-MAKE_RCSID("$NetBSD: var.c,v 1.843 2021/02/23 00:11:07 rillig Exp $");
+MAKE_RCSID("$NetBSD: var.c,v 1.844 2021/02/23 00:15:22 rillig Exp $");
 
 typedef enum VarFlags {
        VFL_NONE        = 0,
@@ -2666,7 +2666,8 @@
                const char *p = mod + 6;
                if (!TryParseSize(&p, &n)) {
                        Parse_Error(PARSE_FATAL,
-                           "Invalid number: %s", mod + 6);
+                           "Invalid number \"%s\" for ':range' modifier",
+                           mod + 6);
                        return AMR_CLEANUP;
                }
                *pp = p;



Home | Main Index | Thread Index | Old Index