I have a tool which generates Makefiles in GNU make syntax. In the case
where a recipe produces multiple ("sibling") targets, the first, naive
iteration of the tool simply stacked them up like
target1 target2 target3 ... : prereq1 prereq2 ...
[recipe]
Of course this breaks parallel builds due to a well-known, well-documented
quirk of make semantics. So in the second go-round I've modified it to
instead generate
target1: prereq1 prereq2 ...
[recipe]
target2 target3 ... : target1
This works better with -j but has run into some other problems which are
limitations of our tool, not make, so I won't waste time detailing them.
Bottom line, what's the recommended way to write Makefiles so as to enable
parallel builds? Is there anything better than the above?
Thanks,
AK
_______________________________________________
Help-make mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-make