Re: Proper usage of multiple rules for the same targets

2018-09-05 Thread Tiphaine Turpin
Hi, The reason for the added dependency was that I am using a compiler which can itself be changed (not in the same Makefile, though), and I wanted to make sure that the source files are recompiled when this tool changes. So a more concrete example is: %.t : %.x x2t $< %.t : x2t 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 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