[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Prerequisite variable expansion
From: |
Paul D. Smith |
Subject: |
Re: Prerequisite variable expansion |
Date: |
Tue, 19 Dec 2000 20:17:14 -0500 |
%% Casey Liscum <address@hidden> writes:
cl> Variables involved in a target-specific modification do not expand to
cl> the updated form when used as a prerequisite for that target. They do
cl> expand properly when used in the rule's command structure.
This is expected behavior.
cl> I was looking over the documentation to find out if this is an
cl> actual bug, but could not find anywhere that says _when_ in the
cl> makefile target-specific variables are set. I assumed it was as
cl> they are read, but this doesn't seem to be the case.
It has nothing to do when the value is set, but rather how it is
expanded. Prerequisites are expanded when the makefile is read, and
they are not expanded within the variable context of the target.
Target-specific variables have the same general rules for use as
automatic variables: they are valid (and not valid) in roughly the same
places.
--
-------------------------------------------------------------------------------
Paul D. Smith <address@hidden> Find some GNU make tips at:
http://www.gnu.org http://www.paulandlesley.org/gmake/
"Please remain calm...I may be mad, but I am a professional." --Mad Scientist