[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: coreutils bootstrapping issue on non-GNU platforms
From: |
Paul Eggert |
Subject: |
Re: coreutils bootstrapping issue on non-GNU platforms |
Date: |
Sat, 30 Dec 2006 22:33:44 -0800 |
User-agent: |
Gnus/5.1008 (Gnus v5.10.8) Emacs/21.4 (gnu/linux) |
address@hidden (Bob Proulx) writes:
> If this bootstrapping issue could be avoided it would be nice.
I installed this patch to do that. Thanks for reporting it. Also, I
noticed the code uses "tail -1" which POSIX does not require support
for, so I fixed that too.
2006-12-30 Paul Eggert <address@hidden>
* gnulib-tool (SORT): Remove, since we no longer assume GNU sort.
Rewrite so as not to assume GNU sort or "tail -1". Also, don't
assume the C locale, and avoid an "eval" that could cause trouble.
Problem with SORT reported by Bob Proulx.
--- gnulib-tool 26 Dec 2006 18:42:09 -0000 1.204
+++ gnulib-tool 31 Dec 2006 06:29:50 -0000 1.205
@@ -66,12 +66,6 @@ if test -z "${AUTOPOINT}" || test -n "${
AUTOPOINT="${GETTEXTPATH}autopoint"
fi
-# GNU sort is needed. Set SORT to its location (not needed if it's called
-# 'sort' and already in the PATH).
-if test -z "$SORT"; then
- SORT=sort
-fi
-
# When using GNU sed, turn off as many GNU extensions as possible,
# to minimize the risk of accidentally using non-portable features.
# However, do this only for gnulib-tool itself, not for the code that
@@ -699,11 +693,14 @@ func_ln_if_changed ()
s,^dnl .*$,,
s, dnl .*$,,
/AC_PREREQ/ {
- s,^.*AC_PREREQ([[ ]*\([^])]*\).*$,prereqs="$prereqs \1",p
+ s,^.*AC_PREREQ([[ ]*\([^])]*\).*$,\1,p
}'
- eval `sed -n -e "$my_sed_traces" < "$configure_ac"`
+ prereqs=`sed -n -e "$my_sed_traces" < "$configure_ac"`
if test -n "$prereqs"; then
- autoconf_minversion=`for version in $prereqs; do echo $version; done |
$SORT -g -u | tail -1`
+ autoconf_minversion=`
+ for version in $prereqs; do echo $version; done |
+ LC_ALL=C sort -nu | sed 1q
+ `
fi
fi
if test -z "$autoconf_minversion"; then