[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: how to force a second variable expansion?
From: |
Robert P. J. Day |
Subject: |
Re: how to force a second variable expansion? |
Date: |
Tue, 8 Mar 2005 09:23:23 -0500 (EST) |
On Tue, 8 Mar 2005, Paul D. Smith wrote:
> %% "Robert P. J. Day" <address@hidden> writes:
>
> rpjd> i have a normally-straightforward macro to process subdirectories:
>
> rpjd> define do-subdirs
> rpjd> @for dir in ${SUBDIRS} ; do \
> rpjd> ${MAKE} CF=$${$${dir}_CONFIG_FILE} -C $@ ; \ (clearly wrong)
> rpjd> ??????????????????????????
> rpjd> done
> rpjd> endef
>
> Of course, this cannot work.
oh, i'd figured that out already, that's why i wrote that it was
"clearly wrong" -- i just wanted to put *something* in there to give
an idea of what i was trying to do, even if it was hopelessly
incorrect. :-)
> It's NEVER possible for the shell to "query back" to the parent make
> process and ask it to resolve some variable, so there's no way you
> can evaluate a MAKE variable like xx_CONFIG_FILE where the "xx"
> value is contained in a SHELL variable like $dir.
i finally twigged on why this wasn't going to work, exactly as you
explained it. dang. obviously, i might get this to work if i can
have all substitution/variable expansion done with the make variables
before invoking any shell commands.
i'll play with this some more. thanks again.
rday