Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 18 Sep 2005 01:30:14 +1000
From:      Joel Hatton <joel@auscert.org.au>
To:        freebsd-questions@freebsd.org
Cc:        "Gary W. Swearingen" <garys@opusnet.com>
Subject:   Re: Environment setting for make 
Message-ID:  <200509171530.j8HFUEdw078985@app.auscert.org.au>
In-Reply-To: Your message of "Sat, 17 Sep 2005 07:17:56 MST." <8j4q8jdbhn.q8j@mail.opusnet.com> 

next in thread | previous in thread | raw e-mail | index | archive | help
> Joel Hatton <freebsd-questions@auscert.org.au> 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'

Sorry if I'm this sounds obtuse, and I'm off to dig out my shell book :)

cheers,
-- Joel Hatton --
Security Analyst                    | Hotline: +61 7 3365 4417
AusCERT - Australia's national CERT | Fax:     +61 7 3365 7031
The University of Queensland        | WWW:     www.auscert.org.au
Qld 4072 Australia                  | Email:   auscert@auscert.org.au




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200509171530.j8HFUEdw078985>