help-make
[Top][All Lists]
Advanced

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

Re: Named parameters in make?


From: Oleksandr Gavenko
Subject: Re: Named parameters in make?
Date: Fri, 10 Jun 2011 14:24:19 +0300
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.17) Gecko/20110414 Thunderbird/3.1.10

On 10.06.2011 1:16, Peng Yu wrote:
Hi,

I think that there is probably no way to support named parameters in
make ($(eval $(call ...))). But I want double-check in case there is
some walkaround to emulate named parameters. Could anybody let me
know?

http://en.wikipedia.org/wiki/Named_parameter

You can emulate C like structure in GNU Make by double substitution:

my_str = "hello"
my_str_len = 4

your_str = "bye"
your_str_len = 3

data = my
$(info String is: $($(data)_str) and $($(data)_str_len) long.)
data = your
$(info String is: $($(data)_str) and $($(data)_str_len) long.)

Is this useful for you?

--
С уважением, Александр Гавенко.



reply via email to

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