Module Name: src
Committed By: rillig
Date: Tue Nov 24 15:59:18 UTC 2020
Modified Files:
src/usr.bin/make: compat.c
src/usr.bin/make/unit-tests: deptgt-end-fail.exp
Log Message:
make(1): fix missing "Stop." after failed .END node in -k mode
To generate a diff of this commit:
cvs rdiff -u -r1.187 -r1.188 src/usr.bin/make/compat.c
cvs rdiff -u -r1.1 -r1.2 src/usr.bin/make/unit-tests/deptgt-end-fail.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/compat.c
diff -u src/usr.bin/make/compat.c:1.187 src/usr.bin/make/compat.c:1.188
--- src/usr.bin/make/compat.c:1.187 Mon Nov 23 23:41:11 2020
+++ src/usr.bin/make/compat.c Tue Nov 24 15:59:18 2020
@@ -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 @@ Compat_Run(GNodeList *targs)
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);
}
Index: src/usr.bin/make/unit-tests/deptgt-end-fail.exp
diff -u src/usr.bin/make/unit-tests/deptgt-end-fail.exp:1.1 src/usr.bin/make/unit-tests/deptgt-end-fail.exp:1.2
--- src/usr.bin/make/unit-tests/deptgt-end-fail.exp:1.1 Tue Nov 24 15:36:51 2020
+++ src/usr.bin/make/unit-tests/deptgt-end-fail.exp Tue Nov 24 15:59:18 2020
@@ -1,4 +1,7 @@
: all
false
*** Error code 1 (continuing)
-exit status 0
+
+Stop.
+make: stopped in unit-tests
+exit status 1