RE: Using 'echo' in a makefile/what shell is used?
Bob replied:
>> >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.
I was mistaken. I had only checked the sh manpage and failed to find a
printf built-in command. But sure enough, printf is in /usr/bin so use
of it from within make would work on both platforms.
Kris
Reply to: