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 handling for .BEGIN dependen...



details:   https://anonhg.NetBSD.org/src/rev/68b12b6f49d8
branches:  trunk
changeset: 957325:68b12b6f49d8
user:      rillig <rillig%NetBSD.org@localhost>
date:      Tue Nov 24 19:04:42 2020 +0000

description:
make(1): fix error handling for .BEGIN dependency in -k mode

diffstat:

 usr.bin/make/compat.c                                  |  7 +++----
 usr.bin/make/unit-tests/deptgt-begin-fail-indirect.exp |  6 ++++--
 2 files changed, 7 insertions(+), 6 deletions(-)

diffs (40 lines):

diff -r 277035e28cd4 -r 68b12b6f49d8 usr.bin/make/compat.c
--- a/usr.bin/make/compat.c     Tue Nov 24 19:02:59 2020 +0000
+++ b/usr.bin/make/compat.c     Tue Nov 24 19:04:42 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: compat.c,v 1.191 2020/11/24 18:17:45 rillig Exp $      */
+/*     $NetBSD: compat.c,v 1.192 2020/11/24 19:04:42 rillig Exp $      */
 
 /*
  * Copyright (c) 1988, 1989, 1990 The Regents of the University of California.
@@ -96,7 +96,7 @@
 #include "pathnames.h"
 
 /*     "@(#)compat.c   8.2 (Berkeley) 3/19/94" */
-MAKE_RCSID("$NetBSD: compat.c,v 1.191 2020/11/24 18:17:45 rillig Exp $");
+MAKE_RCSID("$NetBSD: compat.c,v 1.192 2020/11/24 19:04:42 rillig Exp $");
 
 static GNode *curTarg = NULL;
 static pid_t compatChild;
@@ -691,8 +691,7 @@
                gn = Targ_FindNode(".BEGIN");
                if (gn != NULL) {
                        Compat_Make(gn, gn);
-                       /* XXX: Replace with GNode_IsError(gn) */
-                       if (gn->made == ERROR) {
+                       if (GNode_IsError(gn)) {
                                PrintOnError(gn, "\nStop.");
                                exit(1);
                        }
diff -r 277035e28cd4 -r 68b12b6f49d8 usr.bin/make/unit-tests/deptgt-begin-fail-indirect.exp
--- a/usr.bin/make/unit-tests/deptgt-begin-fail-indirect.exp    Tue Nov 24 19:02:59 2020 +0000
+++ b/usr.bin/make/unit-tests/deptgt-begin-fail-indirect.exp    Tue Nov 24 19:04:42 2020 +0000
@@ -1,4 +1,6 @@
 false
 *** Error code 1 (continuing)
-: This is not made.
-exit status 0
+
+Stop.
+make: stopped in unit-tests
+exit status 1



Home | Main Index | Thread Index | Old Index