On 12/18/12 12:54, Marc Espie wrote:
On Tue, Dec 18, 2012 at 12:02:15PM +0100, Marc Espie wrote:
Is this theoretical, or is there an actual Makefile where this is a problem ?
I'd rather NOT go through extra shell forking just for the sake of it.
Also, echo -e is specific to ksh and NOT a posix option, so you're going
to end up with something that is deeply non-portable.
Either way, this is fucked up.
Let me put things another way: I'd rather NOT put echo as a shell built-in,
because it is very often needed as a "raw thingy". Actually, I would even
say that instead of running echo directly, it would make sense to have
it be a built-in in make proper...
I guess that makes sense in a way. People should not rely on any of the
various behaviours of echo, so if there is a chance that the firdst
parameter to echo is a dash, they should use sth else.
However, the exposed behaviour in the example shown is confusing. Does
it deserve being mentioned in the man page?
Right now, it says:
As an optimization, make may execute very simple commands without
going through an extra shell process, as long as this does not
change observable behavior.
Should we mention `echo` being an exception or are there more? Should we
say "with a few minor exception"? Or should we just leave it as-is?
/Alexander