bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] bootstrap: support Automake-NG in $buildreq


From: Eric Blake
Subject: Re: [PATCH] bootstrap: support Automake-NG in $buildreq
Date: Mon, 23 Apr 2012 09:51:46 -0600
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:11.0) Gecko/20120329 Thunderbird/11.0.1

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 <address@hidden>
> ---
>  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   address@hidden    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]