[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Using 'echo' in a makefile/what shell is used?



Kris Huber wrote:
> >Your best option is to avoid echo when using any escape sequences at
> >all.  It is a can of worms.  Instead use 'printf' which is a new
> >command with no legacy that is required to support the standard
> >features on all systems.
> >
> >  printf "\tfoo: bar\n"
> 
> This command isn't on the legacy system I want to keep it interoperable
> with.

Wow.  You must have a quite old legacy system.

  http://www.unix-systems.org/single_unix_specification_v2/xcu/printf.html

The SUSv2 is from 1997.  So we are talking more than six years old at
the least.

And you could always add the 'printf' command to the system.  That is
one of the things I like about that solution.  You can change any
system that does not have it into one that does have it quite easily.
Whereas changing the behavior of /bin/sh's built in echo command is a
little more invasive to the system.

> >[A side note.  You keep calling it 'gmake'.  Why?  Is there another
> >option for 'make' on GNU systems?  Why not just call it 'make'?]
> 
> It was/is called gmake when installed on Unix systems that already have
> another make utility that you prefer not to overwrite.  The user who
> wanted to use GNU make made a symbolic link in his 'bin' directory to
> gmake.

Ah.  That makes sense on non-GNU systems.  Because we were talking on
debian-user I was making assumptions that it was a Debian system.  And
of course making assumptions often leads to misunderstandings.

Bob

Attachment: pgpVTksdaWxGb.pgp
Description: PGP signature


Reply to: