From owner-freebsd-questions@FreeBSD.ORG Sat Sep 17 15:39:10 2005 Return-Path: X-Original-To: freebsd-questions@freebsd.org 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 1B91616A41F for ; Sat, 17 Sep 2005 15:39:10 +0000 (GMT) (envelope-from keramida@ceid.upatras.gr) Received: from kane.otenet.gr (kane.otenet.gr [195.170.0.95]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6943943D46 for ; Sat, 17 Sep 2005 15:39:09 +0000 (GMT) (envelope-from keramida@ceid.upatras.gr) Received: from flame.pc (patr530-a118.otenet.gr [212.205.215.118]) by kane.otenet.gr (8.13.4/8.13.4/Debian-1) with ESMTP id j8HFd1iF027376; Sat, 17 Sep 2005 18:39:02 +0300 Received: from flame.pc (flame [127.0.0.1]) by flame.pc (8.13.4/8.13.4) with ESMTP id j8HFcn0q001476; Sat, 17 Sep 2005 18:38:49 +0300 (EEST) (envelope-from keramida@ceid.upatras.gr) Received: (from keramida@localhost) by flame.pc (8.13.4/8.13.4/Submit) id j8HFcnLH001475; Sat, 17 Sep 2005 18:38:49 +0300 (EEST) (envelope-from keramida@ceid.upatras.gr) Date: Sat, 17 Sep 2005 18:38:49 +0300 From: Giorgos Keramidas To: Joel Hatton Message-ID: <20050917153849.GA1453@flame.pc> References: <8j4q8jdbhn.q8j@mail.opusnet.com> <200509171530.j8HFUEdw078985@app.auscert.org.au> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200509171530.j8HFUEdw078985@app.auscert.org.au> Cc: "Gary W. Swearingen" , freebsd-questions@freebsd.org Subject: Re: Environment setting for make X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Sep 2005 15:39:10 -0000 On 2005-09-18 01:30, Joel Hatton wrote: > > Joel Hatton writes: > > > > > # E.g. use `env MAKEOBJDIRPREFIX=/somewhere/obj make' > > > > > > However, and at this risk of exposing my inexperience and just plain old > > > sounding foolish, how does this method of setting MAKEOBJDIRPREFIX differ > > > from: > > > > > > setenv MAKEOBJDIRPREFIX /somewhere/obj > > > > It's effect is only seen by "make", instead of all subsequent > > commands. It also works in a Bourne shell where the Bourne equivalent > > of the second method is: MAKEOBJDIRPREFIXj=/somewhere/obj make > > Thanks, I think I understand. > > I'm a little confused about the Bourne shell, however. Do you mean that > (1) 'MAKEOBJDIRPREFIX=/somewhere/obj make' is equivalent to (2) 'setenv > MAKEOBJDIRPREFIX /somewhere/obj' or (3) 'env > MAKEOBJDIRPREFIX=/somewhere/obj make'? Can (1) be substituted for (3)? > > From my trials, (1) and (2) aren't similar as MAKEOBJDIRPREFIX remains > unset in the shell after make exits for (1). In csh (2) has the same effect > as the Bourne 'export MAKEOBJDIRPREFIX=/somewhere/obj' (1) sets the environment variable for the duration of the command only. (2) works in csh and derivatives in a way similar to (3) (3) sets MAKEOBJDIRPREFIX permanently in the environment of Bourne shells