help-make
[Top][All Lists]
Advanced

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

Re: Bug in $(call ...) ?


From: Alexey Neyman
Subject: Re: Bug in $(call ...) ?
Date: Mon, 20 Dec 2004 17:56:33 +0300
User-agent: KMail/1.6.2

Well, I'll use it, thanks. However, it seems that it's actually a 
workaround. Perhaps this Makefile will illustrate better what I mean:

<<<<
X = echo
A = $($(1)) $$(1) $$(2)
B := $(call A,X)
C = echo $(1) $(2)

$(warning "$(value B)")
$(warning "$(value C)")

all:
        @echo '[$(call B,hi,lo)]'
        @echo '[$(call C,hi,lo)]'
>>>>

Note that the $(warning)s show that the values of B and C are the 
same. Yet, the results of echo differ:

Makefile:6: "echo $(1) $(2)"
Makefile:7: "echo $(1) $(2)"
[echo $(1) $(2)]
[echo hi lo]


On Monday 20 December 2004 16:33, you wrote:
> Perhaps the following modifications get you what you want.  I think
> perhaps you are just missing the passthrough for the numbered 
parameters
> for B.
> 
> X = echo
> A = $($(1)) $(2) $(3)
> B = $(call A,X,$(1),$(2))
> 
> all:    
>         @echo '[$(B)]'
>         @echo '[$(call B,hi,lo)]'
>         $(call B,hi,lo)
> 
>   Ken
> 
> On Mon, Dec 20, 2004 at 01:40:02PM +0300, Alexey Neyman wrote:
> > Hi,
> > 
> > address@hidden:~/tmp> cat Makefile
> > X = echo
> > A = $($(1)) $$(1) $$(2)
> > B = $(call A,X)
> > 
> > all:
> >         @echo '[$(B)]'
> >         @echo '[$(call B,hi,lo)]'
> > address@hidden:~/tmp> make all
> > [echo $(1) $(2)]
> > [echo $(1) $(2)]
> > 
> > I thought the "$(call B,hi,lo)" should have evaluated to "echo hi 
lo", 
> > shouldn't it?
> > 
> > Regards,
> > Alexey.
> > 
> > -- 
> > Ah, an insult... a sometimes necessary and constructive release of 
> > tension.
> >                         -- Pkunks, SC2
> > 
> > 
> > _______________________________________________
> > Help-make mailing list
> > address@hidden
> > http://lists.gnu.org/mailman/listinfo/help-make
> 

-- 
All are welcome to our nest.
We are Pkunk, we cannot help but love all.
                        -- Pkunks, SC2




reply via email to

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