[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
passing variable values to subsequent make calls
From: |
Robert P. J. Day |
Subject: |
passing variable values to subsequent make calls |
Date: |
Wed, 9 Jun 2004 08:15:21 -0400 (EDT) |
what's the preferred way to pass some variable values to multiple
levels of recursive makes?
i realize that, first, i can assign and export variables, as in
export ARCH=ppc
and that variable will be available to all of my subsequent recursive
makes. but i've always been kind of leery of exporting variables at a top
level of *anything* -- it reminds me too much of setting a global
variable.
if, in some makefile, i use
${MAKE} ARCH=ppc <subdir>
is it correct that that variable will only be visible just to that
subdirectory make unless i explicitly set it again for further recursive
calls?
finally, i see in the make docs the construct:
MAKE := ${MAKE} ARCH=ppc
does this mean that, wherever i use the ${MAKE} invocation in any
recursive makefile, that ARCH is automatically defined for all sub-makes
all the way down? i guess that's the way that would appeal to me the
most, if that's how it works.
rday
- passing variable values to subsequent make calls,
Robert P. J. Day <=