From owner-freebsd-ports@FreeBSD.ORG Sat Mar 13 07:08:20 2004 Return-Path: Delivered-To: freebsd-ports@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id BCD5616A4CE for ; Sat, 13 Mar 2004 07:08:20 -0800 (PST) Received: from postman.arcor.de (postman4.arcor-online.net [151.189.0.154]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2B8FE43D31 for ; Sat, 13 Mar 2004 07:08:20 -0800 (PST) (envelope-from eikemeier@fillmore-labs.com) Received: from fillmore.dyndns.org (port-212-202-51-138.reverse.qsc.de [212.202.51.138]) (authenticated bits=0)i2DF4WD2012496 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO); Sat, 13 Mar 2004 16:04:32 +0100 (MET) Received: from [172.16.0.2] (helo=fillmore-labs.com) by fillmore.dyndns.org with esmtp (Exim 4.30; FreeBSD) id 1B2Agf-000I1v-Gj; Sat, 13 Mar 2004 16:04:29 +0100 Message-ID: <405322FD.10109@fillmore-labs.com> Date: Sat, 13 Mar 2004 16:04:29 +0100 From: Oliver Eikemeier Organization: Fillmore Labs GmbH - http://www.fillmore-labs.com/ MIME-Version: 1.0 To: Matthias Andree References: <20040313002807.GA13745@merlin.emma.line.org> <40525BE9.2050208@fillmore-labs.com> <20040313102423.GA6018@merlin.emma.line.org> <4052E92D.7050000@fillmore-labs.com> In-Reply-To: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit User-Agent: KMail/1.5.9 cc: ports@freebsd.org Subject: Re: ports/64037 and the alleged && -> ; failure from March 2002 X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Mar 2004 15:08:20 -0000 Matthias Andree wrote: > Oliver Eikemeier writes: > >>GNU make is not used for ports Makefiles, only for the ones in the >>distribution, and you don't want to Patch Them All(tm), do you? > > perl -ple 's/;/\&\&/g;' `find /usr/ports -iname 'makefile*'` # :*) Hay, that's a nice one-liner to break the ports tree. Does yours still build the INDEX after this line? I won't try... > Seriously, whether we use gmake or make for ports does not matter, > neither documents the "make passes -e to /bin/sh" behaviour, hence it > must not be relied on under any circumstances. Use the source, Luke ;) Submit a patch to the manpage. > Robustness considerations mandate using && over ; when cmd1 is a > prerequisite for cmd2 in a cmd1 && cmd2 AND-list. Some day, someone > considers the whole command line isn't that important, prepends a '-' > (making make suppress the -e) and cmd2 gets executed when cmd1 failed in > a cmd1;cmd2 sequence. target: -cd /nonexistent; if [ ! -f "removeall" ]; then exit 1; fi rm -Rf * > Seriously, any Makefile that is touched by a committer or maintainer > should have the ";" changed to "&&" if "&&" is needed to make the thing > work without -e. The point is that if the cd fails, they won't work anyway, with or without the change. So we don't gain anything. >>Finally I'm not sure if simply ignoring the following command is the >>right thing to do. I can construct an example where this is fatal too, >>but IMHO all such examples would be pathological. > > Sure you can (but then we have OR-lists with "||" :-P) Nope. > I'm not saying that all ';' must be '&&', but in the common "cd, then > execute a command" case, it really ought to be. Provide one example in the ports tree where this is really benificial. -Oliver