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 missing "Stop." after failed .END ...



details:   https://anonhg.NetBSD.org/src/rev/f88a01c3362d
branches:  trunk
changeset: 978541:f88a01c3362d
user:      rillig <rillig%NetBSD.org@localhost>
date:      Tue Nov 24 15:59:18 2020 +0000

description:
make(1): fix missing "Stop." after failed .END node in -k mode

diffstat:

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

diffs (40 lines):

diff -r eab09ccca1d5 -r f88a01c3362d usr.bin/make/compat.c
--- a/usr.bin/make/compat.c     Tue Nov 24 15:36:51 2020 +0000
+++ b/usr.bin/make/compat.c     Tue Nov 24 15:59:18 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: compat.c,v 1.187 2020/11/23 23:41:11 rillig Exp $      */
+/*     $NetBSD: compat.c,v 1.188 2020/11/24 15:59:18 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.187 2020/11/23 23:41:11 rillig Exp $");
+MAKE_RCSID("$NetBSD: compat.c,v 1.188 2020/11/24 15:59:18 rillig Exp $");
 
 static GNode *curTarg = NULL;
 static pid_t compatChild;
@@ -718,8 +718,7 @@
        if (errors == 0) {
                GNode *endNode = Targ_GetEndNode();
                Compat_Make(endNode, endNode);
-               /* XXX: Did you mean endNode->made instead of gn->made? */
-               if (gn->made == ERROR) {
+               if (gn->made == ERROR || endNode->made == ERROR) {
                        PrintOnError(gn, "\nStop.");
                        exit(1);
                }
diff -r eab09ccca1d5 -r f88a01c3362d usr.bin/make/unit-tests/deptgt-end-fail.exp
--- a/usr.bin/make/unit-tests/deptgt-end-fail.exp       Tue Nov 24 15:36:51 2020 +0000
+++ b/usr.bin/make/unit-tests/deptgt-end-fail.exp       Tue Nov 24 15:59:18 2020 +0000
@@ -1,4 +1,7 @@
 : all
 false
 *** Error code 1 (continuing)
-exit status 0
+
+Stop.
+make: stopped in unit-tests
+exit status 1



Home | Main Index | Thread Index | Old Index