On Sunday 06 August 2006 12:58, Richard Andrews wrote:
> --- Jeff Dike <[EMAIL PROTECTED]> wrote:
> > On Sat, Aug 05, 2006 at 05:45:33PM +0200, Jax wrote:
> > > > $ ARCH=um make linux
> > >
> > > make linux ARCH=um
> >
> > These should be the same.  In one case, it's in the environment and in
> > the other, it's on the command line, but it's all the same to the build.
>
> I've seen that they aren't the same in some contexts. Not kernel specific
> contexts either.
>
> It's a GNU make thing. One (env first) is setting an environment and one
> (env after make) is setting a makefile variable. The two are not the same.
> I haven't gotten to the bottom of why; I suspect it comes down to when make
> falls back to environments to fill missing make variables.

Environment variables _are_ imported but 
ARCH = ...
overrides it, while
ARCH ?= ...
does not.
In make linux ARCH=um, instead, ARCH=um overrides any assignment in Makefiles, 
except override ARCH = ... and (for this one I only guess) assignments like 
CFLAGS += ...

> ...also:
> A=thing make

> has an environment flow-on effect to all children of make; whereas "make
> A=thing" does not unless make so chooses.
Yes, probably an export is needed, I'm not sure; in most situations (aka 
well-written makefiles), though, this should not make a difference (i.e. if 
submakefiles need a var it should be exported by the top Makefile).
-- 
Inform me of my mistakes, so I can keep imitating Homer Simpson's "Doh!".
Paolo Giarrusso, aka Blaisorblade
http://www.user-mode-linux.org/~blaisorblade
Chiacchiera con i tuoi amici in tempo reale! 
 http://it.yahoo.com/mail_it/foot/*http://it.messenger.yahoo.com 


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
User-mode-linux-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-user

Reply via email to