[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: gnulib-tool nits
Re: gnulib-tool nits
Sat, 23 Jun 2007 15:18:49 +0200
* 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-tool will not become measurably faster by optimizing
> code that is executed only once.
Quite true. My changes were rather mechanical in the sense that I
simply searched for some constructs and fixed them in the passing,
using well-known other constructs from Autoconf.
The fact that these introduced a bug came surprising to me, but thanks
to your proofreading it now also helps to fix a bug in Autoconf itself.
> > (self_abspathname): Rewrite algorithm to set it, reindent.
> Regression: PATH values with a trailing empty field, such as
> are not handled correctly.
> (I guess you copied that idiom from somewhere, and it was already wrong
> at the original place.)
Yep. Patches to Autoconf and Libtool coming up on their respective
lists. Patch for gnulib-tool below.
> The indentation is not right: [...]
Apologies. Libtool uses slightly different indenting, which I have
gotten used to, and I forgot to readjust that here.
OK to apply this patch to fix these issues?
2007-06-23 Ralf Wildenhues <address@hidden>
* gnulib-tool: Fix iteration over $PATH by IFS by adding `:' at
the end. Fix indentation.
Report by Bruno Haible.
RCS file: /cvsroot/gnulib/gnulib/gnulib-tool,v
retrieving revision 1.236
diff -u -r1.236 gnulib-tool
--- gnulib-tool 23 Jun 2007 07:40:58 -0000 1.236
+++ gnulib-tool 23 Jun 2007 13:17:00 -0000
@@ -838,23 +838,22 @@
/*) self_abspathname="$0" ;;
*/*) self_abspathname=`pwd`/"$0" ;;
- for d in $PATH; do
+ for d in $PATH:; do
+ test -z "$d" && d=.
+ if test -x "$d/$0" && test ! -d "$d/$0"; then
- test -z "$d" && d=.
- if test -x "$d/$0" && test ! -d "$d/$0"; then
+ if test -z "$self_abspathname"; then
+ func_fatal_error "could not locate the gnulib-tool program - how did you
- if test -z "$self_abspathname"; then
- func_fatal_error "could not locate the gnulib-tool program - how did you
while test -h "$self_abspathname"; do
# Resolve symbolic link.
@@ -3007,7 +3006,7 @@
-e 's,October,10,' -e 's,Oct,10,' \
-e 's,November,11,' -e 's,Nov,11,' \
-e 's,December,12,' -e 's,Dec,12,' \
- -e 's,^,00,' -e 's,^[0-9]*\([0-9][0-9] \),\1,' \
+ -e 's,^,00,' -e 's,^[0-9]*\([0-9][0-9] \),\1,' \
-e 's,^\([0-9]*\) \([0-9]*\) \([0-9]*\),\3\2\1,'`
Re: gnulib-tool nits, Paul Eggert, 2007/06/26