[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug #30606] mysterious behavior from $(if)
From: |
Paul D. Smith |
Subject: |
[bug #30606] mysterious behavior from $(if) |
Date: |
Fri, 30 Jul 2010 20:46:50 +0000 |
User-agent: |
Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.8) Gecko/20100723 Ubuntu/10.04 (lucid) Firefox/3.6.8 |
Follow-up Comment #5, bug #30606 (project make):
If by "already expanded ... when the template is being defined" you mean
after the define T ... endef, then you're not correct. define, by itself,
uses deferred expansion (just like "T = $(foo)") and so right after the define
the value of T has NOT been expanded.
You can see this yourself using the $(info ...) function; very handy for
debugging expansion issues:
define T
b := $(subst aa,,$(1))
yn := $(if $(strip $(b)),y,n)
vs := $(vs) $(1):$(yn)
endef
$(info $(value T))
will show you the value of the T variable without expanding it first... this
is the text string that make is keeping for the variable T.
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?30606>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/