News for hackers. Stuff that matters.
Re:Make: Theory and Practice by ploxiln on Thursday April 02, 2015 @01:58PM (#9312299)
That's actually one rule which applies to multiple targets.

If you run without parallelism (the default, -j1), it'll work fine, since make will run the rule for one target, and then when it comes to the second one, make will notice that it's already up-to-date (based on file timestamp).

If you run with -j4 or something, it make will likely run the rule twice, simultaneously. That may or may not be a bad problem depending on how the rule writes the output file.

EDIT: man I must have really rushed reading your post... as you say, this does appear to be a heuristic for GNU Make when it's a pattern rule. clearly make is tricky and I end up learning stuff every time I use make...

Re:Make: Theory and Practice by evmar on Thursday April 02, 2015 @03:33PM (#9312650)
The automake manual has a description of how to get the dependencies right for multiple outputs: http://www.gnu.org/software/automake/manual/html_node/Multip... . (Disclaimer: I'm no expert, and the Make book mentioned elsewhere in this thread may have a better solution.)
Re:Make: Theory and Practice by rspeer on Thursday April 02, 2015 @04:34PM (#9313039)
I think that feature only allows one input. It's 1:N, not M:N.
Re:Make: Theory and Practice by grayclhn on Thursday April 02, 2015 @11:09PM (#9314260)
Maybe, but extending it to an M:1 1:N approach is 95% of the general M:N solution.