[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Bug in $(call ...) ?
From: |
Ken Smith |
Subject: |
Re: Bug in $(call ...) ? |
Date: |
Mon, 20 Dec 2004 10:14:47 -0500 |
User-agent: |
Mutt/1.5.6i |
Double dollar sign causes a single dollar sign literal to be present in
the string. I don't think that is what you want here. Also, if you
$(call) something which $(call)s another thing, the $(n) variables must
be passed along otherwise they will be lost.
I'm afraid your true intent is no clearer to me now than it was when I
read your first example. Can you help me understand?
Ken
On Mon, Dec 20, 2004 at 05:56:33PM +0300, Alexey Neyman wrote:
> 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
- Bug in $(call ...) ?, Alexey Neyman, 2004/12/20
- Re: Bug in $(call ...) ?, Ken Smith, 2004/12/20
- Re: Bug in $(call ...) ?, Alexey Neyman, 2004/12/20
- Re: Bug in $(call ...) ?, Boris Kolpackov, 2004/12/20
- Re: Bug in $(call ...) ?, Paul D. Smith, 2004/12/20
- Re: Bug in $(call ...) ?, Alexey Neyman, 2004/12/21
- Re: Bug in $(call ...) ?, Boris Kolpackov, 2004/12/21
- Re: Bug in $(call ...) ?, Paul D. Smith, 2004/12/21
- Re: Bug in $(call ...) ?, Boris Kolpackov, 2004/12/21
- Re: Bug in $(call ...) ?, Paul D. Smith, 2004/12/24