Date: Tue, 21 May 1996 16:05:35 -0700 From: Archie Cobbs <archie@whistle.com> To: FreeBSD-gnats-submit@freebsd.org Subject: bin/1231: make(1) execution of ``.BEGIN'' does not halt on error Message-ID: <199605212305.QAA20668@bubba.whistle.com> Resent-Message-ID: <199605212310.QAA08719@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 1231
>Category: bin
>Synopsis: make(1) execution of ``.BEGIN'' does not halt on error
>Confidential: no
>Severity: serious
>Priority: high
>Responsible: freebsd-bugs
>State: open
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Tue May 21 16:10:05 PDT 1996
>Last-Modified:
>Originator: Archie Cobbs
>Organization:
Whistle Communications, Inc.
>Release: FreeBSD 2.1-STABLE i386
>Environment:
FreeBSD-2.1R, 2.2-current, ??
>Description:
When the special ``.BEGIN'' target is used to have a list
of commands execute at the beginning of the make, and one
of those commands fails, make(1) does not halt execution
as it should.
>How-To-Repeat:
Run make on this makefile:
.BEGIN:
@echo aborting initialization
/usr/bin/false
default:
@echo this should not get executed
>Fix:
Apply the following patch in the main source directory:
Index: compat.c
===================================================================
RCS file: /tribe/cvs/freebsd/src/usr.bin/make/compat.c,v
retrieving revision 1.3
diff -c -r1.3 compat.c
*** 1.3 1995/05/30 06:31:49
--- compat.c 1996/05/18 23:39:38
***************
*** 615,620 ****
--- 615,624 ----
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);
+ }
}
}
>Audit-Trail:
>Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199605212305.QAA20668>
