On 04/23/2012 09:17 AM, Stefano Lattarini wrote: > * bootstrap (check_versions): Handle automake and aclocal from > Automake-NG specially. They can be specified as respectively > the "automake-ng" and "aclocal-ng" requirements. > > Signed-off-by: Stefano Lattarini <stefano.lattar...@gmail.com> > --- > build-aux/bootstrap | 17 ++++++++++++++++- > 1 file changed, 16 insertions(+), 1 deletion(-) > > diff --git a/build-aux/bootstrap b/build-aux/bootstrap > index 5aa73cc..c0960f5 100755 > --- a/build-aux/bootstrap > +++ b/build-aux/bootstrap > @@ -1,6 +1,6 @@ > #! /bin/sh > # Print a version string. > -scriptversion=2012-04-19.22; # UTC > +scriptversion=2012-04-23.22; # UTC > > # Bootstrap this package from checked-out sources. > > @@ -433,6 +433,21 @@ check_versions() { > GZIP) ;; # Do not use $GZIP: it contains gzip options. > *) eval "app=\${$appvar-$app}" ;; > esac > + # Special handling for (still experimental) Automake-NG programs. > + # They remain named as the mainstream Automake programs ("automake", > + # and "aclocal") to avoid gratuitous incompatibilities with > + # pre-existing usages (by, say, autoreconf, or custom autogen.sh > + # scripts), but correctly identify themselves (as being part of > + # "GNU automake-ng") when asked their version. > + case $app in > + automake-ng|aclocal-ng) > + app=`echo "$app" | sed 's/-ng$//'` > + ($app --version | grep '(GNU automake-ng)') >/dev/null 2>&1 || { > + echo "$me: Error: '$app' not found or not from Automake-NG" >&2 > + ret=1 > + continue > + } ;; > + esac
What you have is worth committing now, but I wonder... Whe are we doing app=`echo "$app" | sed 's/-ng$//'` instead of app=${app%-ng}? We already use $() elsewhere in bootstrap, and therefore we already require a decent POSIX shell (that is, Solaris /bin/sh can't run bootstrap, and all other shells that support $() tend to also support ${var%suffix}). There's probably a lot of cleanup we could do to bootstrap once we assume a decent shell; but we should probably also ensure that bootstrap can rerun itself under a decent shell rather than the current state of dying a horrible death on Solaris. -- Eric Blake ebl...@redhat.com +1-919-301-3266 Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature