> 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


> $(eval) lets you generate rules dynamically.

Does it really support the generation of completely new build rules
(instead of adjusting only recipes)?


> NPROC:=$(shell grep "processor" /proc/cpuinfo  | cut -b12- )
> # this returns "0 1 2 3" etc
> 
> # Then you might use eval to generate rules dynamically:
> 
> $(foreach N,$(NPROC),$(eval
>    # YOUR DYNAMIC RULE
>   MYTARGET_$(N):
> <TAB>mytool --dosomething -o$@
>   )
> )

Would it make sense to stress such functionality a bit more
in the documentation?


> I am probably guessing wrong but perhaps this gives you some ideas.

I thank you very much for your constructive feedback.

Regards,
Markus

_______________________________________________
Bug-make mailing list
Bug-make@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-make

Reply via email to