help-make
[Top][All Lists]
Advanced

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

Re: Target specific variable settings used in target prerequistes ?


From: Paul Smith
Subject: Re: Target specific variable settings used in target prerequistes ?
Date: Wed, 14 Mar 2007 21:40:50 -0400

On Wed, 2007-03-14 at 08:24 -0700, Frazer Worley wrote:
> We're trying use variable settings defined in a target specific rules
> within the target's prerequisite list. It doesn't appear that
> the variables settings are actually valid/applied until the body of
> the target - the command section.

That's correct.  The GNU make manual says, in the second paragraph of
the section "Target-Specific Variable Values":

        As with automatic variables, these values are only available
        within the context of a target's command script (and in other
        target-specific assignments).

Since we don't really know what you're trying to do we can't give you a
range of suggestions on how to do it.

However, the only way to do exactly what you're trying to do is to use
$(eval ...).  There are other, simpler ways to do things if what you're
trying to do doesn't require the full flexibility of eval.

-- 
-------------------------------------------------------------------------------
 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




reply via email to

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