Re: Proper usage of multiple rules for the same targets

2018-09-06 Thread Thomas Martitz
Am 06.09.18 um 14:56 schrieb Paul Smith: On Thu, 2018-09-06 at 08:05 +, Tiphaine Turpin wrote: The static pattern solution looks very nice, thanks. It seems to work fine in the real Makefile. And there is no visible performance impact, as far as I can tell (I'm not sure about how efficiently

Re: Proper usage of multiple rules for the same targets

2018-09-06 Thread Paul Smith
On Thu, 2018-09-06 at 08:05 +, Tiphaine Turpin wrote: > The static pattern solution looks very nice, thanks. It seems to work > fine in the real Makefile. And there is no visible performance > impact, as far as I can tell (I'm not sure about how efficiently > static pattern rules are implemente

Re: Proper usage of multiple rules for the same targets

2018-09-06 Thread Sébastien Hinderer
Thanks a lot for your feedback Tiphaine! Thanks for having explored what I suggested, and great you could find a solution to your problem! Best wishes, Sébastien. ___ Help-make mailing list Help-make@gnu.org https://lists.gnu.org/mailman/listinfo/help-

Re: Proper usage of multiple rules for the same targets

2018-09-06 Thread Tiphaine Turpin
Tiphaine From: Help-make on behalf of Max Gautier Sent: Wednesday, September 5, 2018 11:03 AM To: help-make@gnu.org Subject: Re: Proper usage of multiple rules for the same targets Hi. To force the behavior you want, I think you could use a static pattern r

Re: Proper usage of multiple rules for the same targets

2018-09-05 Thread Max Gautier
Hi. To force the behavior you want, I think you could use a static pattern rule : The syntax being as follow : :: In your case, that would give : foo.t: %.t: %.x touch $@ foo.t: another_file That achieves what you want, if I'm testing correctly. (You'll need to have a way to have all of

Re: Proper usage of multiple rules for the same targets

2018-09-05 Thread Sébastien Hinderer
Dear Tiphaine, Sure, I understand your use case a bit better. Yesterday I tried to hack something which failed but let me share it anyway, just in case it inspires you or somebody else. Imagine for each target that uses additional dependencies you could write them in a variable like foo_prereqs

Re: Proper usage of multiple rules for the same targets

2018-09-05 Thread Tiphaine Turpin
ing $^ in their recipe. So, there is no absolute need to use an additional rule, but I thought it was the most natural way to proceed when I wrote it. Best Regards, Tiphaine From: Sébastien Hinderer Subject: Re: Proper usage of multiple rules for the s

Re: Proper usage of multiple rules for the same targets

2018-09-04 Thread Sébastien Hinderer
Dear Tiphaine, At the moment I can't come up with another way to solve the problem you describe, sorry. However, would you be able to describe in more details the context and what you are trying to achieve? Perhaps if we understand what exactly you are trying to do we can come up with another solu