Alan Curry wrote: > Let me show you what happens if I try to clone coreutils from git and compile > in the most straightforward way possible: > > % git clone git://git.sv.gnu.org/coreutils > Cloning into coreutils... > remote: Counting objects: 151287, done. > remote: Compressing objects: 100% (37539/37539), done. > remote: Total 151287 (delta 113807), reused 150796 (delta 113449) > Receiving objects: 100% (151287/151287), 26.95 MiB | 767 KiB/s, done. > Resolving deltas: 100% (113807/113807), done. > Script started on Tue May 3 00:40:20 2011 > % cd coreutils > % ./bootstrap > ./bootstrap: Error: '-9' not found > > ./bootstrap: See README-prereq for how to get the prerequisite programs > %
Thanks for the report. Here's the fix I'm using in coreutils. (soon to be in gnulib's bootstrap, too) >From 71cc2504dc05423f10a7a4928cadbbf619cb3780 Mon Sep 17 00:00:00 2001 From: Jim Meyering <[email protected]> Date: Tue, 3 May 2011 10:09:20 +0200 Subject: [PATCH] build: avoid bootstrap failure when $GZIP is set Running "GZIP=-9 ./bootstrap" would fail right away, because the tool-version-checking code would treat the upper-cased program name as an environment variable name and if that has a value use the result as the application name. That works fine for automake, autoconf, etc. but not for gzip. * bootstrap (check_versions): Do not treat $GZIP as a program name. If defined at all, it is supposed to list gzip options. Reported by Alan Curry in http://debbugs.gnu.org/8609 --- bootstrap | 7 +++++-- 1 files changed, 5 insertions(+), 2 deletions(-) diff --git a/bootstrap b/bootstrap index f004ad3..c45ae48 100755 --- a/bootstrap +++ b/bootstrap @@ -1,6 +1,6 @@ #! /bin/sh # Print a version string. -scriptversion=2011-03-03.12; # UTC +scriptversion=2011-05-03.08; # UTC # Bootstrap this package from checked-out sources. @@ -405,7 +405,10 @@ check_versions() { # Honor $APP variables ($TAR, $AUTOCONF, etc.) appvar=`echo $app | tr '[a-z]-' '[A-Z]_'` test "$appvar" = TAR && appvar=AMTAR - eval "app=\${$appvar-$app}" + case $appvar in + GZIP) ;; # Do not use $GZIP: it contains gzip options. + *) eval "app=\${$appvar-$app}" ;; + esac inst_ver=$(get_version $app) if [ ! "$inst_ver" ]; then echo "$me: Error: '$app' not found" >&2 -- 1.7.5.141.g791a
