Re: [PATCH] make it possible to keep Config/Kbuild snippets in *.c files

2010-05-14 Thread Cristian Ionescu-Idbohrn
On Fri, 14 May 2010, Rob Landley wrote: To get this technique to stop modifying the data going through it, you have to export IFS=$(echo -e \n) to get it to stop trimming leading spaces, Please don't do that. It's not portable. With dash being the default shell on ubuntu, on the way to

Re: [PATCH] gen_build_files.sh: Remove bashisms

2010-05-14 Thread Rob Landley
On Thursday 13 May 2010 18:05:53 Peter Tyser wrote: Using 'read' without a variable is not supported in many shells. Lines such as 'while read; do' in gen_build_files.sh would result in build failures when using sh or dash as an interpreter: Simple fix: say #!/bin/bash at the top of all shell

Re: [PATCH] make it possible to keep Config/Kbuild snippets in *.c files

2010-05-14 Thread Rob Landley
On Friday 14 May 2010 10:46:54 Cristian Ionescu-Idbohrn wrote: On Fri, 14 May 2010, Rob Landley wrote: To get this technique to stop modifying the data going through it, you have to export IFS=$(echo -e \n) to get it to stop trimming leading spaces, Please don't do that. It's not

Re: [PATCH] gen_build_files.sh: Remove bashisms

2010-05-14 Thread Cristian Ionescu-Idbohrn
On Fri, 14 May 2010, Rob Landley wrote: On Thursday 13 May 2010 18:05:53 Peter Tyser wrote: Using 'read' without a variable is not supported in many shells. Lines such as 'while read; do' in gen_build_files.sh would result in build failures when using sh or dash as an interpreter:

Re: [PATCH] gen_build_files.sh: Remove bashisms

2010-05-14 Thread Peter Tyser
On Fri, 2010-05-14 at 15:41 -0500, Rob Landley wrote: On Thursday 13 May 2010 18:05:53 Peter Tyser wrote: Using 'read' without a variable is not supported in many shells. Lines such as 'while read; do' in gen_build_files.sh would result in build failures when using sh or dash as an

Re: [PATCH] gen_build_files.sh: Remove bashisms

2010-05-14 Thread Rob Landley
On Friday 14 May 2010 15:52:24 Cristian Ionescu-Idbohrn wrote: On Fri, 14 May 2010, Rob Landley wrote: On Thursday 13 May 2010 18:05:53 Peter Tyser wrote: Using 'read' without a variable is not supported in many shells. Lines such as 'while read; do' in gen_build_files.sh would result in

Re: [PATCH] gen_build_files.sh: Remove bashisms

2010-05-14 Thread Rob Landley
On Friday 14 May 2010 15:57:34 Cristian Ionescu-Idbohrn wrote: On Fri, 14 May 2010, Peter Tyser wrote: I also personally prefer explicitly specifying a variable for 'read' instead of using the magical REPLY variable. Yes. Horrid obfuscation. By the way, if you were making the argument