From owner-svn-src-all@FreeBSD.ORG Tue Aug 21 06:14:50 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9C7DC10657E9; Tue, 21 Aug 2012 06:14:48 +0000 (UTC) (envelope-from sjg@juniper.net) Received: from exprod7og111.obsmtp.com (exprod7og111.obsmtp.com [64.18.2.175]) by mx1.freebsd.org (Postfix) with ESMTP id 75E9F8FC0A; Tue, 21 Aug 2012 06:14:46 +0000 (UTC) Received: from P-EMHUB02-HQ.jnpr.net ([66.129.224.36]) (using TLSv1) by exprod7ob111.postini.com ([64.18.6.12]) with SMTP ID DSNKUDMnVZkqXHwL33mdA3e/uAg9xE4pF3pJ@postini.com; Mon, 20 Aug 2012 23:14:47 PDT Received: from magenta.juniper.net (172.17.27.123) by P-EMHUB02-HQ.jnpr.net (172.24.192.33) with Microsoft SMTP Server (TLS) id 8.3.213.0; Mon, 20 Aug 2012 23:14:43 -0700 Received: from chaos.jnpr.net (chaos.jnpr.net [172.24.29.229]) by magenta.juniper.net (8.11.3/8.11.3) with ESMTP id q7L6Ehh91556; Mon, 20 Aug 2012 23:14:43 -0700 (PDT) (envelope-from sjg@juniper.net) Received: from chaos.jnpr.net (localhost [127.0.0.1]) by chaos.jnpr.net (Postfix) with ESMTP id 0B2D158085; Mon, 20 Aug 2012 23:14:43 -0700 (PDT) To: Garrett Cooper In-Reply-To: References: <201207180557.q6I5vheM034018@svn.freebsd.org> <20120726084903.GA48240@lo0.su> <20120821053519.BD5A158085@chaos.jnpr.net> Comments: In-reply-to: Garrett Cooper message dated "Mon, 20 Aug 2012 22:46:33 -0700." From: "Simon J. Gerraty" X-Mailer: MH-E 7.82+cvs; nmh 1.3; GNU Emacs 22.3.1 Date: Mon, 20 Aug 2012 23:14:43 -0700 Message-ID: <20120821061443.0B2D158085@chaos.jnpr.net> MIME-Version: 1.0 Content-Type: text/plain Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Ruslan Ermilov , "David E. O'Brien" Subject: Re: svn commit: r238563 - head/gnu/usr.bin/groff/tmac X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Aug 2012 06:14:50 -0000 >> note use of && rather than ; which can be very dangerous > >In standard scripts I would agree. In FreeBSD pmake, I would disagree, >but it seems that it's the odd man out: Yes, this is because FreeBSD make still uses the shell's -e for error detection. NetBSD (hence bmake) abandoned that quite a while ago, as it does more harm that good. I had a vague recollection that the posix man page covered this, but the text is somewhat ambiguous. Its descripton of using system() though is probably why most makefile authors expect the command line to be the unit of exection and thus success/failure. false || echo ok works ok even with -e, but while most makes will print ok for this one too: false; test $$? != 0 && echo ok it will fail if -e is used. That's a contrived example, but I know David had a fun real life example a couple of years ago that was quite painful to workaround. --sjg