[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Axiom-developer] ENV

From: root
Subject: Re: [Axiom-developer] ENV
Date: Wed, 22 Nov 2006 13:13:07 -0500

> No, again you're making the assumption that ENV does not mean anything
> particular.  ENV means something very precise is POSIXilly correct
> shells.  In particular its value is exported, which means that if you
> don't set it, you get what it is supposed to be (not empty).  The
> above is an experiment you can reproduce with a POSIX-compliant shell.
> The issue is very simple: avoid ENV.  Use MAKEFLAGS (which I'm working on).

Eh? I have no idea what you're talking about. It is perfectly legal
to set and reference shell variables and this "prefix" technique
is supported as standard syntax by shells. Shell variables are a 
time-honored way of making completely opaque code, making it nearly 
impossible to understand what is going on. Why would you want to 
change that? :-)

Anyway, MAKEFLAGS assumes that the environment variables have something
to do with MAKE, which they don't. MAKE neither knows nor cares about
the environment variables as they are not intended for controlling MAKE.

One example of the shell variable (mis)use in Axiom is the handling
of the PLATFORM variable. This variable is passed on the command line
to certain C calls in a define as in -D${PLATFORM}

Another use is to pass "structural" information such as where the
INT, OBJ, and MNT directories live. You could, for instance, trivially
have done builds "out of the source tree" by simply setting these
variables to other directories. The only reason they point into the
AXIOM subdirectory (although NOT into the "src" directory) is that
the philosophy of the build process states that axiom NEVER writes
outside its toplevel directory. But, as I said, this is trivial to
change by changing the definitions of ${INT}, ${OBJ}, and ${MNT}

So the point is that there are a lot of variables collected into
ENV and they have a lot of different uses and abuses. 


reply via email to

[Prev in Thread] Current Thread [Next in Thread]