From owner-freebsd-questions@FreeBSD.ORG Thu Jan 8 06:01:10 2004 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8C94F16A4CE for ; Thu, 8 Jan 2004 06:01:10 -0800 (PST) Received: from mail-relay1.mirrorimage.net (mail-relay1.mirrorimage.net [209.58.140.11]) by mx1.FreeBSD.org (Postfix) with ESMTP id 97BF343D1F for ; Thu, 8 Jan 2004 06:01:04 -0800 (PST) (envelope-from leblanc@mirrorimage.net) Received: from leblanc.mirrorimage.net (leblanc.mirrorimage.net [209.192.210.146]) by mail-relay1.mirrorimage.net (8.9.3/8.9.3) with ESMTP id JAA16416; Thu, 8 Jan 2004 09:00:48 -0500 Received: from leblanc.mirrorimage.net (localhost [127.0.0.1]) i08E14Wi057355; Thu, 8 Jan 2004 09:01:04 -0500 (EST) (envelope-from leblanc@leblanc.mirrorimage.net) Received: (from leblanc@localhost) by leblanc.mirrorimage.net (8.12.8p1/8.12.8/Submit) id i08E14d6057354; Thu, 8 Jan 2004 09:01:04 -0500 (EST) Date: Thu, 8 Jan 2004 09:01:03 -0500 From: Louis LeBlanc To: freebsd-questions@freebsd.org Message-ID: <20040108140103.GA45646@keyslapper.org> Mail-Followup-To: freebsd-questions@freebsd.org, Matthew Seaman , Ceri Davies , Eric F Crist References: <200401071736.42467.ecrist@adtechintegrated.com> <20040107233858.GM8322@submonkey.net> <20040108134304.GA3863@happy-idiot-talk.infracaninophile.co.uk> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20040108134304.GA3863@happy-idiot-talk.infracaninophile.co.uk> User-Agent: Mutt/1.5.5.1i cc: Ceri Davies cc: Eric F Crist Subject: Re: What is the difference between ; and && X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: freebsd-questions@freebsd.org List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Jan 2004 14:01:10 -0000 On 01/08/04 01:43 PM, Matthew Seaman sat at the `puter and typed: > On Wed, Jan 07, 2004 at 11:38:58PM +0000, Ceri Davies wrote: > > On Wed, Jan 07, 2004 at 05:36:42PM -0600, Eric F Crist wrote: > > > > make depend && make && make install > > > [Of course, if the Makefile has it's dependencies correct, then a simple > > "make install" will achieve the same thing.] > > Hmmm... Usually 'make depend' generates a dependency Makefile, which > is .included'ed into the main Makefile on subsequent runs. That means > that > > make depend ; make all > > has a different effect to: > > make depend all > > Unless make(1) has been taught to keep tabs on it's included Makefiles > and knows how to re-load them if their modification time changes. As > I understood it, that was a trick that gmake(1) could do but that BSD > make couldn't. > > Cheers, > > Matthew I've missed a bit of this thread, so this may be redundant . . . The primary reason for using 'make depend && make && make install' is to halt the whole procedure in the event of a failure at any point. The '&&' separates the commands much the way ';' does, but makes the execution of each one dependent upon the success of the previous. This means that 'make' (the second command) will be executed if and only if 'make depend' succeeds. Likewise, 'make install' will only be executed if and only if 'make' is executed and succeeds. If there is a failure at any point, you won't have nearly so far to backtrack to find the point of failure. This is a fantastic method for 'scheduling' multiple build stages without having to sit at the keyboard. HTH Lou -- Louis LeBlanc leblanc@keyslapper.org Fully Funded Hobbyist, KeySlapper Extrordinaire :) http://www.keyslapper.org ԿԬ Hailing frequencies open, Captain.