changeset 16801:558c82d4d437

bootstrap: support Automake-NG in $buildreq * bootstrap (check_versions): Handle automake and aclocal from Automake-NG specially. They can be specified as respectively the "automake-ng" and "aclocal-ng" requirements.
author Stefano Lattarini <stefano.lattarini@gmail.com>
date Mon, 23 Apr 2012 17:17:21 +0200
parents 5cf6a59f8a4e
children b21cba808f11
files ChangeLog build-aux/bootstrap
diffstat 2 files changed, 24 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2012-04-26  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+	bootstrap: support Automake-NG in $buildreq
+	* bootstrap (check_versions): Handle automake and aclocal from
+	Automake-NG specially.  They can be specified as respectively
+	the "automake-ng" and "aclocal-ng" requirements.
+
 2012-04-25  Eric Blake  <eblake@redhat.com>
 
 	bootstrap: only force latest Makefile.in.in for gettext module
--- a/build-aux/bootstrap
+++ b/build-aux/bootstrap
@@ -1,6 +1,6 @@
 #! /bin/sh
 # Print a version string.
-scriptversion=2012-04-25.17; # UTC
+scriptversion=2012-04-26.13; # UTC
 
 # Bootstrap this package from checked-out sources.
 
@@ -433,6 +433,22 @@
         GZIP) ;; # Do not use $GZIP:  it contains gzip options.
         *) eval "app=\${$appvar-$app}" ;;
     esac
+
+    # Handle the still-experimental Automake-NG programs specially.
+    # 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
     if [ "$req_ver" = "-" ]; then
       # Merely require app to exist; not all prereq apps are well-behaved
       # so we have to rely on $? rather than get_version.