On Thu, Jan 3, 2013 at 5:16 PM, Eric Melski <[email protected]> wrote: > The second advantage of #pragma syntax is that it is not > backwards-incompatible. A makefile using "#pragma multi" will still be > usable with older versions of GNU make, except that you don't get the > special multi-output behavior. In the best case, the alternatives will > cause older versions of GNU make to emit spurious warnings; in the worst > case they could cause build failures. "#pragma multi" is completely > invisible to versions of GNU make that don't support it.
Eric, I'm not disagreeing with your overall approach but fairness requires noting that this could just as well be spun as a bug as a feature. E.g. "the alternatives would squawk when used with a version that doesn't support them, whereas the pragma would be silently ignored leading to potentially incorrect incremental builds (http://en.wikipedia.org/wiki/Fail-fast)". The traditional pragma-like mechanism in make is the special target. Has anyone considered implementing that way? E.g. .MULTI foo bar: baz touch foo bar (one could ask "what if I want a target called .MULTI?" but I think the entire /^\.[A-Z]+/ namespace is at least unofficially reserved). But I guess the pragma is a fait accompli and it's up to GNU make to implement it or not. Also, the blog post doesn't discuss automatic variables. What happens with them in this case? Is there public (non-customer) documentation? -David Boyce _______________________________________________ Help-make mailing list [email protected] https://lists.gnu.org/mailman/listinfo/help-make
