3 ms·
I usually create dummy targets for that kind of thing, and then include loops to create dependencies of each of the N on the dummy task. Alternatively, you can
by cafebeen 12y ago
I usually create dummy targets for that kind of thing, and then include loops to create dependencies of each of the N on the dummy task. Alternatively, you can create a directory for the output and use that as a target, although you need to ensure the target directory only exists once the M:N task has finished.
- rspeer 12y agoI'm pretty sure everything you're suggesting here is a workaround that breaks the intended features of Make. If a multiple-output step fails, I want the outputs to be deleted, and the rest of the dependencies to keep working so I don't have to rebuild everything from scratch. Whatever you're suggesting with dummy targets sounds like it's certainly not going to track the dependencies correctly. I already know that directories aren't tracked correctly as dependencies.
- cafebeen 12y agoYeah, you can wrap it up in a script that only produces the expected outputs on a success. As for workarounds... this is hacker news, is it not?