help-make
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Can I defer make-var expansion until a command is executed


From: Brian Dessent
Subject: Re: Can I defer make-var expansion until a command is executed
Date: Mon, 04 Aug 2008 00:38:20 -0700

Chen Jun ???? wrote:

> Well Brian, the example presented by me is just a fabricated one, not
> for my real world use. I use $(shell ) just to introduce a make variable
> or a make function so that my question becomes concrete. My real world
> case regarding this problem is quite a bit complex so I'd like not to
> talk about to it directly.

Regardless, I think the same principle holds: if you need logic that
considers factors that change during the execution of a recipe, then
code that logic using the shell rather than make's functions.  I can't
think of a situation where this would not be possible; you can pass
through to shell variables the contents of any makefile variables that
might be required by that logic.  And if all else fails there's always
the universal hammer of recursively invoking a sub-make.

Brian




reply via email to

[Prev in Thread] Current Thread [Next in Thread]