[GRASS5] Gmake is not Gnu Make

Thierry Laronde tlaronde at polynum.com
Wed Nov 19 04:36:10 EST 2003


On Tue, Nov 18, 2003 at 10:16:00PM +0000, Glynn Clements wrote:
> 
> To take a concrete example, look at the SuS specification for the
> "echo" command. It doesn't accept any switches, but it does mandate a
> number of backslash sequences which aren't supported by either the
> echo program from GNU sh-utils or the bash echo built-in command.

Yes, GNU echo is not compliant. There is the '-e' switch but with a
syntax that is not the POSIX one (no leading 0).

> 
> In particular, the SuS version doesn't support the -n switch (don't
> add a newline), but specifies a backslash sequence for this purpose;
> however, neither of the aforementioned GNU implementations support the
> backslash sequence. Consequently, we just have to accept that there is
> no portable way to echo a string without a trailing newline. Waving a
> copy of the SuS at the computer won't help.

echo "Blabla blabla" | tr -d '\n'

And multi line version:

echo "Blabla|blabla" | tr -d '\n' | tr '|' '\n'

> 
> BTW, I'm not suggesting that the "preferred" make program should be
> anything other than GNU make. Just to re-iterate my position:

[FWIW I prefer BSD make. So it was not a plea for GNU make ;)]
> 
> 1. Any future build system should be based around GNU make.
> 
> 2. We should be willing to accept reasonable constraints in order to
> accommodate other make utilities which are "sufficiently" compatible
> with GNU make.
> 
> 3. We shouldn't accept drastic constraints in order to accomodate
> every possible make utility.

Agreed.

Cheers,
-- 
Thierry Laronde (Alceste) <tlaronde at polynum.org>
Key fingerprint = 0FF7 E906 FBAF FE95 FD89  250D 52B1 AE95 6006 F40C




More information about the grass-dev mailing list