Re: gnulib-tool nits

2007-07-01 Thread Bruno Haible
Ralf Wildenhues wrote: > 2007-07-01 Bruno Haible <[EMAIL PROTECTED]> > Eric Blake <[EMAIL PROTECTED]> > Ralf Wildenhues <[EMAIL PROTECTED]> > > * gnulib-tool (self_abspathname): Fix algorithm to cope with > empty components in $PATH, denoting '.'. Thanks. I unta

Re: gnulib-tool nits

2007-07-01 Thread Ralf Wildenhues
Hello Bruno, * Bruno Haible wrote on Sun, Jul 01, 2007 at 12:43:33PM CEST: > > Yes. Your findings and my and Eric's comments [1][2][3] are giving enough > hints how a portable and efficient solution can look like, I think? OK thanks. I installed this. Cheers, Ralf 2007-07-01 Bruno Haible <[E

Re: gnulib-tool nits

2007-07-01 Thread Bruno Haible
Hello Ralf, > This still needs to be addressed. Yes. Your findings and my and Eric's comments [1][2][3] are giving enough hints how a portable and efficient solution can look like, I think? pathx="$PATH" case ":$PATH:" in *::*) pathx=`echo ":$PATH:" | sed -e 's/:::*/:.:/g' -e 's/^:

Re: gnulib-tool nits

2007-07-01 Thread Bruno Haible
Paul Eggert wrote: > It's fine with me if there's a test like this: > > case $PATH in > *::* | :* | *:) echo 'Please use "." rather than empty entries in PATH."; > exit 1 > esac It's not fine with me: - It's not the role of any particular program to tell the user how to set his environment

Re: gnulib-tool nits

2007-07-01 Thread Ralf Wildenhues
Hello Bruno, all, * Ralf Wildenhues wrote on Sat, Jun 23, 2007 at 03:18:49PM CEST: > > * gnulib-tool: Fix iteration over $PATH by IFS by adding `:' at > the end. Fix indentation. > (func_create_megatestdir): Likewise. > Report by Bruno Haible. This still needs to be addr

Re: gnulib-tool nits

2007-06-26 Thread Paul Eggert
Bruno Haible <[EMAIL PROTECTED]> writes: > Regression: PATH values with a trailing empty field, such as > PATH=/usr/bin:/bin: > are not handled correctly. I see the problem in general, but is that an issue for this particular case? gnulib-tool needn't cater to empty entries in PATH. It's fine

Re: gnulib-tool nits

2007-06-24 Thread Ralf Wildenhues
* Eric Blake wrote on Sat, Jun 23, 2007 at 11:31:12PM CEST: > According to Bruno Haible on 6/23/2007 1:09 PM: > > But then use IFS (so that PATH elements containing spaces are handled > > correctly), ignoring empty fields from the cases C and D. In summary, > > something like this: > > > > pathx

Re: gnulib-tool nits

2007-06-23 Thread Eric Blake
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 According to Bruno Haible on 6/23/2007 1:09 PM: > But then use IFS (so that PATH elements containing spaces are handled > correctly), ignoring empty fields from the cases C and D. In summary, > something like this: > > pathx=`echo ":$PATH:" | sed -e

Re: gnulib-tool nits

2007-06-23 Thread Bruno Haible
Hi Ralf. > This isn't reliable either: bash 3.1.17 and ksh do this: > $ ( d=:a:b:; IFS=:; for i in $d ; do echo .$i. ; done ) > .. > .a. > .b. > > but pdksh does this: > $ ( d=:a:b:; IFS=:; for i in $d ; do echo .$i. ; done ) > .. > .a. > .b. > .. This is only the tip of the iceberg. I tested al

Re: gnulib-tool nits

2007-06-23 Thread Ralf Wildenhues
* Ralf Wildenhues wrote on Sat, Jun 23, 2007 at 03:18:49PM CEST: > +IFS=: > +for d in $PATH:; do This isn't reliable either: bash 3.1.17 and ksh do this: $ ( d=:a:b:; IFS=:; for i in $d ; do echo .$i. ; done ) .. .a. .b. but pdksh does this: $ ( d=:a:b:; IFS=:; for i in $d ; do echo .$i.

Re: gnulib-tool nits

2007-06-23 Thread Ralf Wildenhues
Hello Bruno, * Bruno Haible wrote on Sat, Jun 23, 2007 at 02:53:41PM CEST: > Ralf Wildenhues wrote: > > Another rough pass over gnulib-tool's tendency to spawn more processes > > than it needs to. > > Why not. But why don't you concentrate on the loops of func_import when > doing that? gnulib-too

Re: gnulib-tool nits

2007-06-23 Thread Bruno Haible
Ralf Wildenhues wrote: > Another rough pass over gnulib-tool's tendency to spawn more processes > than it needs to. Why not. But why don't you concentrate on the loops of func_import when doing that? gnulib-tool will not become measurably faster by optimizing code that is executed only once. >

Re: gnulib-tool nits

2007-06-23 Thread Ralf Wildenhues
Hello Paul, * Paul Eggert wrote on Fri, Jun 22, 2007 at 11:43:00PM CEST: > Ralf Wildenhues <[EMAIL PROTECTED]> writes: > > > + if test -z "$self_abspathname"; then > > self_abspathname should be initialized to the empty string, for this > test to work reliably (this problem is present in the cu

Re: gnulib-tool nits

2007-06-22 Thread Paul Eggert
Ralf Wildenhues <[EMAIL PROTECTED]> writes: > + if test -z "$self_abspathname"; then self_abspathname should be initialized to the empty string, for this test to work reliably (this problem is present in the current version). Otherwise, it looks good to me.

gnulib-tool nits

2007-06-22 Thread Ralf Wildenhues
Another rough pass over gnulib-tool's tendency to spawn more processes than it needs to. OK to install? Note the IFS initialization is needed because POSIX allows shells to have it unset at script start, in which case field splitting is required to work as if IFS was set properly, but it would br

Re: small gnulib-tool nits

2007-01-28 Thread Ralf Wildenhues
* Bruno Haible wrote on Sun, Jan 28, 2007 at 02:40:37PM CET: > Ralf Wildenhues wrote: > > 2007-01-28 Ralf Wildenhues <[EMAIL PROTECTED]> > > > > * gnulib-tool (func_emit_lib_Makefile_am, func_add_or_update) > > (func_create_testdir): Ensure C locale for `grep' and `tr' > > character

Re: small gnulib-tool nits

2007-01-28 Thread Bruno Haible
Ralf Wildenhues wrote: > 2007-01-28 Ralf Wildenhues <[EMAIL PROTECTED]> > > * gnulib-tool (func_emit_lib_Makefile_am, func_add_or_update) > (func_create_testdir): Ensure C locale for `grep' and `tr' > character ranges. > (func_create_megatestdir): Avoid one `grep'. Fix b

small gnulib-tool nits

2007-01-28 Thread Ralf Wildenhues
Some more bits in gnulib-tool depend upon the locale. The patch below fixes some of those. It also kills one superfluous grep, and avoids a misparse of the ACLOCAL_AMFLAGS. OK to apply? Cheers, Ralf 2007-01-28 Ralf Wildenhues <[EMAIL PROTECTED]> * gnulib-tool (func_emit_lib_Makefile