bug-make
[Top][All Lists]
Advanced

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

Re: Dynamic evaluation of build scripts


From: SF Markus Elfring
Subject: Re: Dynamic evaluation of build scripts
Date: Sun, 11 Jan 2015 10:00:43 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.3.0

>>> So you have in your toolbox $(shell) and $(eval).
>>
>> I am not familiar enough with the second make function.
>> http://www.gnu.org/software/make/manual/html_node/Eval-Function.html
> 
> I wrote some blog posts about eval and other metaprogramming techniques
> in make that you might find interesting:
> 
> http://make.mad-scientist.net/category/metaprogramming/

How many software implementations support the eval function in make files?


>>> # Then you might use eval to generate rules dynamically:
>>>
>>> $(foreach N,$(NPROC),$(eval
>>>    # YOUR DYNAMIC RULE
>>>   MYTARGET_$(N):
>>> <TAB>mytool --dosomething -o$@
>>>   )
>>> )

How do you think about to mention in the manual how several parameters
can be passed?
When should parameters be used as further function arguments?

Regards,
Markus



reply via email to

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