URL:
<http://savannah.gnu.org/bugs/?30606>
Summary: mysterious behavior from $(if)
Project: make
Submitted by: r_p
Submitted on: Fri 30 Jul 2010 07:07:46 PM GMT
Severity: 3 - Normal
Item Group: Bug
Status: None
Privacy: Public
Assigned to: None
Open/Closed: Open
Discussion Lock: Any
Component Version: 3.81
Operating System: None
Fixed Release: None
Triage Status: None
_______________________________________________________
Details:
With the following Makefile (simplified from my actual Makefile):
define T
b := $(subst aa,,$(1))
yn := $(if $(strip $(b)),y,n)
vs := $(vs) $(1):$(yn)
endef
tests := ab ab ab ab ab ab ab
$(foreach t,$(tests), \
$(eval $(call T,$(t))) \
)
all:; @echo $(vs)
I get the following output:
+verbatim
ab: ab:n ab:y ab:y ab:y ab:y ab:y
What on earth is going on here? How can I fix it?
(I put the $(strip) in to be sure it wasn't related to
https://savannah.gnu.org/bugs/?5798
.)
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?30606>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
_______________________________________________
Bug-make mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/bug-make