[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: passing variable values to subsequent make calls
From: |
Paul D. Smith |
Subject: |
Re: passing variable values to subsequent make calls |
Date: |
Wed, 9 Jun 2004 09:06:21 -0400 |
%% "Robert P. J. Day" <address@hidden> writes:
rpjd> if, in some makefile, i use
rpjd> ${MAKE} ARCH=ppc <subdir>
rpjd> is it correct that that variable will only be visible just to
rpjd> that subdirectory make unless i explicitly set it again for
rpjd> further recursive calls?
No. Variables set on the command line are also set as if they were on
the command line of all recursive make invocations.
Otherwise top-level commands like:
make CFLAGS=-g
would not do the right thing.
rpjd> finally, i see in the make docs the construct:
rpjd> MAKE := ${MAKE} ARCH=ppc
rpjd> does this mean that, wherever i use the ${MAKE} invocation in
rpjd> any recursive makefile, that ARCH is automatically defined for
rpjd> all sub-makes all the way down?
Yes... this is identical to your first example, where ARCH=ppc is added
to the command line directly.
--
-------------------------------------------------------------------------------
Paul D. Smith <address@hidden> Find some GNU make tips at:
http://www.gnu.org http://make.paulandlesley.org
"Please remain calm...I may be mad, but I am a professional." --Mad Scientist