[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: Environment varles
From: |
Yuri Polyakov |
Subject: |
RE: Environment varles |
Date: |
Tue, 30 Oct 2001 09:38:53 +0200 |
Hi Paul,thanks for the quick respond.
Actually I don't care to change the value of the make variable.
I want to change the value of the variable in make and effect by this
change the
environment,its all.
For example : if I have a variable called MYVAR (defined like "setenv MYVAR
1" in some .login
file) I want to change the value of MYVAR from the MAKE and by this change
to change the
$ENV{'MYVAR'} - its value in the environment.
Is it possible?
thanks.
-----Original Message-----
From: Paul D. Smith [mailto:address@hidden
Sent: Tuesday, October 30, 2001 12:51 AM
To: Yuri Polyakov
Cc: 'address@hidden'
Subject: Re: Environment varles
%% Yuri Polyakov <address@hidden> writes:
yp> The question is : is there a way to change the Environment
yp> Variable in MAKE? The meanning is not to overwrite the value for
yp> make only but effect by this change the value of this variable in
yp> the Environment..
I don't quite know what you mean, but there's no good way to change an
environment variable without also changing the make variable of the same
name.
Your only alternative is to do something like:
foo:
MYVAR=somevalue <command>
That is, set it in the commandline itself.
If you want to set it for all subprocesses of make, then you must set
the variable in the makefile (changing the value of that variable in
make) and export it:
MYVAR = somevalue
export MYVAR
--
----------------------------------------------------------------------------
---
Paul D. Smith <address@hidden> Find some GNU make tips at:
http://www.gnu.org http://www.paulandlesley.org/gmake/
"Please remain calm...I may be mad, but I am a professional." --Mad
Scientist