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(1): fix error message for ::!= modifier wi...
details: https://anonhg.NetBSD.org/src/rev/aa784c157b3f
branches: trunk
changeset: 975291:aa784c157b3f
user: rillig <rillig%NetBSD.org@localhost>
date: Tue Aug 25 21:16:53 2020 +0000
description:
make(1): fix error message for ::!= modifier with shell error
It's just too easy to confuse st->val and val.
diffstat:
usr.bin/make/unit-tests/varmod-assign.exp | 2 +-
usr.bin/make/unit-tests/varmod-assign.mk | 6 +++---
usr.bin/make/var.c | 8 ++++----
3 files changed, 8 insertions(+), 8 deletions(-)
diffs (67 lines):
diff -r 9f2c14237b06 -r aa784c157b3f usr.bin/make/unit-tests/varmod-assign.exp
--- a/usr.bin/make/unit-tests/varmod-assign.exp Tue Aug 25 21:07:39 2020 +0000
+++ b/usr.bin/make/unit-tests/varmod-assign.exp Tue Aug 25 21:16:53 2020 +0000
@@ -21,6 +21,6 @@
make: Unfinished modifier for ASSIGN ('}' missing)
ok=word
-make: "previous" returned non-zero status
+make: " echo word; false " returned non-zero status
err=previous
exit status 0
diff -r 9f2c14237b06 -r aa784c157b3f usr.bin/make/unit-tests/varmod-assign.mk
--- a/usr.bin/make/unit-tests/varmod-assign.mk Tue Aug 25 21:07:39 2020 +0000
+++ b/usr.bin/make/unit-tests/varmod-assign.mk Tue Aug 25 21:16:53 2020 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: varmod-assign.mk,v 1.5 2020/08/25 21:07:39 rillig Exp $
+# $NetBSD: varmod-assign.mk,v 1.6 2020/08/25 21:16:53 rillig Exp $
#
# Tests for the obscure ::= variable modifiers, which perform variable
# assignments during evaluation, just like the = operator in C.
@@ -73,9 +73,9 @@
mod-assign-shell-error:
# If the command succeeds, the variable is assigned.
- @${SH_OK::!= echo word; true} echo ok=${SH_OK}
+ @${SH_OK::!= echo word; true } echo ok=${SH_OK}
# If the command fails, the variable keeps its previous value.
# FIXME: the error message says: "previous" returned non-zero status
@${SH_ERR::=previous}
- @${SH_ERR::!= echo word; false} echo err=${SH_ERR}
+ @${SH_ERR::!= echo word; false } echo err=${SH_ERR}
diff -r 9f2c14237b06 -r aa784c157b3f usr.bin/make/var.c
--- a/usr.bin/make/var.c Tue Aug 25 21:07:39 2020 +0000
+++ b/usr.bin/make/var.c Tue Aug 25 21:16:53 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: var.c,v 1.471 2020/08/25 16:27:24 rillig Exp $ */
+/* $NetBSD: var.c,v 1.472 2020/08/25 21:16:53 rillig Exp $ */
/*
* Copyright (c) 1988, 1989, 1990, 1993
@@ -69,14 +69,14 @@
*/
#ifndef MAKE_NATIVE
-static char rcsid[] = "$NetBSD: var.c,v 1.471 2020/08/25 16:27:24 rillig Exp $";
+static char rcsid[] = "$NetBSD: var.c,v 1.472 2020/08/25 21:16:53 rillig Exp $";
#else
#include <sys/cdefs.h>
#ifndef lint
#if 0
static char sccsid[] = "@(#)var.c 8.3 (Berkeley) 3/19/94";
#else
-__RCSID("$NetBSD: var.c,v 1.471 2020/08/25 16:27:24 rillig Exp $");
+__RCSID("$NetBSD: var.c,v 1.472 2020/08/25 21:16:53 rillig Exp $");
#endif
#endif /* not lint */
#endif
@@ -2906,7 +2906,7 @@
const char *errfmt;
char *cmd_output = Cmd_Exec(val, &errfmt);
if (errfmt)
- Error(errfmt, st->val);
+ Error(errfmt, val);
else
Var_Set(st->v->name, cmd_output, v_ctxt);
free(cmd_output);
Home |
Main Index |
Thread Index |
Old Index