From owner-freebsd-bugs Tue May 21 16:10:09 1996 Return-Path: owner-bugs Received: (from root@localhost) by freefall.freebsd.org (8.7.3/8.7.3) id QAA08731 for bugs-outgoing; Tue, 21 May 1996 16:10:09 -0700 (PDT) Received: (from gnats@localhost) by freefall.freebsd.org (8.7.3/8.7.3) id QAA08719; Tue, 21 May 1996 16:10:06 -0700 (PDT) Resent-Date: Tue, 21 May 1996 16:10:06 -0700 (PDT) Resent-Message-Id: <199605212310.QAA08719@freefall.freebsd.org> Resent-From: gnats (GNATS Management) Resent-To: freebsd-bugs Resent-Reply-To: FreeBSD-gnats@freefall.FreeBSD.org, archie@whistle.com Received: from whistle.com ([207.76.205.131]) by freefall.freebsd.org (8.7.3/8.7.3) with ESMTP id QAA08393 for ; Tue, 21 May 1996 16:06:13 -0700 (PDT) Received: (from smap@localhost) by whistle.com (8.7.5/8.6.12) id QAA00872 for ; Tue, 21 May 1996 16:05:41 -0700 (PDT) Received: from bubba.whistle.com(207.76.205.7) by whistle.com via smap (V1.3) id sma000870; Tue May 21 16:05:36 1996 Received: (from archie@localhost) by bubba.whistle.com (8.6.12/8.6.12) id QAA20668; Tue, 21 May 1996 16:05:35 -0700 Message-Id: <199605212305.QAA20668@bubba.whistle.com> Date: Tue, 21 May 1996 16:05:35 -0700 From: Archie Cobbs Reply-To: archie@whistle.com To: FreeBSD-gnats-submit@freebsd.org X-Send-Pr-Version: 3.2 Subject: bin/1231: make(1) execution of ``.BEGIN'' does not halt on error Sender: owner-bugs@freebsd.org X-Loop: FreeBSD.org Precedence: bulk >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: