bug-make
[Top][All Lists]
Advanced

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

[bug #30606] mysterious behavior from $(if)


From: Reinier Post
Subject: [bug #30606] mysterious behavior from $(if)
Date: Fri, 30 Jul 2010 19:07:46 +0000
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.8) Gecko/20100722 Firefox/3.6.8 FireTorrent/2.0.1 GTB7.1 ( .NET CLR 3.5.30729)

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/




reply via email to

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