summaryrefslogtreecommitdiffstats
path: root/usr.bin/make/compat.c
diff options
context:
space:
mode:
authorsteve <steve@FreeBSD.org>1996-09-25 02:55:49 +0000
committersteve <steve@FreeBSD.org>1996-09-25 02:55:49 +0000
commitb9bf5744b2048badff0e858380fc88b26dbc80c3 (patch)
tree2556f28caa855357eaa911a518205e751a1cbf9b /usr.bin/make/compat.c
parent1c3a7303b4653188049b65a5f728be9158f4d0f6 (diff)
downloadFreeBSD-src-b9bf5744b2048badff0e858380fc88b26dbc80c3.zip
FreeBSD-src-b9bf5744b2048badff0e858380fc88b26dbc80c3.tar.gz
Fix for PR# 1231, make(1) execution of ``.BEGIN'' does
not halt on error. Thanks to Wolfram for reminding me. ;) Also remove a unnecessary test for c == '\n', since the loop (in ParseSkipLine) will not terminate unless c == '\n' || c == EOF, and the EOF case is already explicted handled by a return statement.
Diffstat (limited to 'usr.bin/make/compat.c')
-rw-r--r--usr.bin/make/compat.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/usr.bin/make/compat.c b/usr.bin/make/compat.c
index a9e8970..0557789 100644
--- a/usr.bin/make/compat.c
+++ b/usr.bin/make/compat.c
@@ -615,6 +615,10 @@ Compat_Run(targs)
gn = Targ_FindNode(".BEGIN", TARG_NOCREATE);
if (gn != NILGNODE) {
Lst_ForEach(gn->commands, CompatRunCommand, (ClientData)gn);
+ if (gn->made == ERROR) {
+ printf("\n\nStop.\n");
+ exit(1);
+ }
}
}
OpenPOWER on IntegriCloud