3 ms·
POSIX make doesn't specify any feature for multiple outputs. Some rather obscure makes that you and I will never get to use have had the feature. GNU Make has
by kazinator 7y ago
POSIX make doesn't specify any feature for multiple outputs.
Some rather obscure makes that you and I will never get to use have had the feature.
GNU Make has, for a long time, supported multiple outputs in pattern rules. Pattern rules have the limitation that the files involved have to be organized around a common stem. If you can make your situation fit this restriction, then you can effectively have multi-target rules by way of pattern instantiation, and this will work with even old versions of GNU Make.
Some two months ago I added the feature to GNU Make to express direct rules with multiple outputs.
http://git.savannah.gnu.org/cgit/make.git/commit/?id=8c888d95f61814dd698bf76126a9079234080d77 http://git.savannah.gnu.org/cgit/make.git/commit/?id=8c888d9...
So bleeding edge GNU Make lets you do:
y.tab.c y.tab.h y.output &: parser.y ...
It had to be done via a bit of new syntax because
x y z : w
already has a meaning: it means that x, y and z independently depend on w, not as a group built together.