[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: how to redefine variable in makefile
From: |
Paul D. Smith |
Subject: |
Re: how to redefine variable in makefile |
Date: |
Thu, 5 Oct 2000 12:02:30 -0400 |
%% Joylene Nettleton <address@hidden> writes:
jn> output_a : input_main
jn> export ORACLE_HOME=oracle-version-a
jn> <pre-process command>
Every line of a make command script is invoked _in a separate shell_.
So, in the first line you set the env variable in one shell, then that
line ends and the shell exits and the variable setting is lost. Then
the next line is invoked in its own shell, and the variable is not set.
You need to put both of those command in one line, then make will pass
them both to the same shell and it will work.
Try:
output_a : input_main
export ORACLE_HOME=oracle-version-a; \
<pre-process command>
Or, using a little fancier sh syntax, you can just write:
output_a : input_main
ORACLE_HOME=oracle-version-a <pre-process command>
--
-------------------------------------------------------------------------------
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