summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitignore2
-rw-r--r--configure.ac2
-rw-r--r--doc/automake.texi4
-rw-r--r--maintainer/maint.mk77
-rw-r--r--t/ax/am-test-lib.sh2
5 files changed, 80 insertions, 7 deletions
diff --git a/.gitignore b/.gitignore
index f13fd2101..19da02f71 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,4 +1,6 @@
/announcement
+/maintainer/autoconf-*/
+/maintainer/autoconf-*.tar.gz
/ChangeLog
/aclocal.m4
/configure
diff --git a/configure.ac b/configure.ac
index 1a0620ff0..0f64fa964 100644
--- a/configure.ac
+++ b/configure.ac
@@ -113,7 +113,7 @@ AC_CHECK_PROGS([LEX], [lex flex], [false])
# following tests, but some users were unable to figure out that their
# installation was broken since --version appeared to work.
-required_autoconf_version=2.65
+AC_SUBST([required_autoconf_version], [2.65])
AC_CACHE_CHECK([whether autoconf is installed], [am_cv_autoconf_installed],
[if AM_RUN_LOG([$am_AUTOCONF --version]);
then
diff --git a/doc/automake.texi b/doc/automake.texi
index 2aed5364e..8f4020bf8 100644
--- a/doc/automake.texi
+++ b/doc/automake.texi
@@ -4088,8 +4088,8 @@ the output variable @code{MKDIR_P} instead. In case you are still
using the @code{AM_PROG_MKDIR_P} macro in your @file{configure.ac},
or its provided variable @code{$(mkdir_p)} in your @file{Makefile.am},
you are advised to switch ASAP to the more modern Autoconf-provided
-interface instead; both the macro and the variable @emph{will be
-removed} in the next major Automake release.
+interface instead; both the macro and the variable might be removed
+in a future major Automake release.
@end table
diff --git a/maintainer/maint.mk b/maintainer/maint.mk
index ac29a72da..baa838126 100644
--- a/maintainer/maint.mk
+++ b/maintainer/maint.mk
@@ -18,6 +18,9 @@
# Avoid CDPATH issues.
unexport CDPATH
+# Program to use to fetch files from the Net.
+WGET = wget
+
# --------------------------------------------------------- #
# Automatic generation of the ChangeLog from git history. #
# --------------------------------------------------------- #
@@ -303,9 +306,6 @@ CLEANFILES += announcement
# Synchronize third-party files that are committed in our repository. #
# --------------------------------------------------------------------- #
-# Program to use to fetch files.
-WGET = wget
-
# Git repositories on Savannah.
git-sv-host = git.savannah.gnu.org
@@ -480,6 +480,77 @@ update-copyright:
| grep -Ev "^($$excluded_re)$$" \
| $(update_copyright_env) xargs $(srcdir)/lib/$@
+# -------------------------------------------------------------- #
+# Run the testsuite with the least supported autoconf version. #
+# -------------------------------------------------------------- #
+
+gnu-ftp = http://ftp.gnu.org/gnu
+
+# Various shorthands: version, name, package name, tarball name,
+# tarball location, installation directory.
+ac-v = $(required_autoconf_version)
+ac-n = autoconf
+ac-p = $(ac-n)-$(ac-v)
+ac-t = $(ac-p).tar.gz
+ac-l = maintainer/$(ac-t)
+ac-d = maintainer/$(ac-p)
+
+fetch-minimal-autoconf: o = $(ac-l)
+fetch-minimal-autoconf:
+ $(AM_V_at)$(MKDIR_P) $(dir $o)
+ $(AM_V_at)rm -f $o $o-t
+ $(AM_V_GEN)$(WGET) -O $o-t $(gnu-ftp)/$(ac-n)/$(ac-t)
+ $(AM_V_at)chmod a-w $o-t && mv -f $o-t $o && ls -l $o
+.PHONY: fetch-minimal-autoconf
+
+build-minimal-autoconf:
+ $(AM_V_GEN):; \
+ test -f $(ac-l) || { \
+ echo "$@: tarball $(ac-l) seems missing." >&2; \
+ echo "$@: have you run '$(MAKE) fetch-minimal-autoconf'?" >&2; \
+ exit 1; \
+ }; \
+ set -x \
+ && $(PERL) $(srcdir)/t/ax/deltree.pl $(ac-d) \
+ && $(MKDIR_P) $(ac-d) \
+ && cd $(ac-d) \
+ && tar xzf '$(CURDIR)/$(ac-l)' \
+ && mv $(ac-p) src \
+ && mkdir build \
+ && cd build \
+ && env CONFIG_SHELL='$(SHELL)' $(SHELL) ../src/configure \
+ --prefix='$(CURDIR)/$(ac-d)' CONFIG_SHELL='$(SHELL)' \
+ && $(MAKE) install
+ $(AM_V_at)echo ' ======' && $(ac-d)/bin/autoconf --version
+.PHONY: build-minimal-autoconf
+
+check-minimal-autoconf:
+ $(AM_V_at)p='$(ac-d)/bin/autoconf'; \
+ if test ! -f "$$p" || test ! -x "$$p"; then \
+ echo "$@: program '$$p' seems missing." >&2; \
+ echo "$@: have you run '$(MAKE) build-minimal-autoconf'?" >&2; \
+ exit 1; \
+ fi
+ $(AM_V_GEN): \
+ && PATH='$(CURDIR)/$(ac-d)/bin$(PATH_SEPARATOR)'$$PATH \
+ && export PATH \
+ && AUTOCONF=autoconf \
+ && AUTOHEADER=autoheader \
+ && AUTORECONF=autoreconf \
+ && AUTOM4TE=autom4te \
+ && AUTOUPDATE=autoupdate \
+ && export AUTOCONF AUTOHEADER AUTORECONF AUTOM4TE AUTOUPDATE \
+ && echo === check autoconf version '(must be = $(ac-v))' \
+ && autoconf --version \
+ && autoconf --version | sed -e 's/^/ /; s/$$/ /' -e 1q \
+ | $(FGREP) '$(ac-v)' >/dev/null \
+ && echo === configure \
+ && ./configure $(shell ./config.status --config) \
+ && echo === build and test \
+ && $(MAKE) check
+.PHONY: check-minimal-autoconf
+
+
# --------------------------------------------------------------- #
# Testing on real-world packages can help us avoid regressions. #
# --------------------------------------------------------------- #
diff --git a/t/ax/am-test-lib.sh b/t/ax/am-test-lib.sh
index 91f8b457b..1ce3b7dfb 100644
--- a/t/ax/am-test-lib.sh
+++ b/t/ax/am-test-lib.sh
@@ -48,7 +48,7 @@ unset DESTDIR
unset prefix exec_prefix bindir datarootdir datadir docdir dvidir
unset htmldir includedir infodir libdir libexecdir localedir mandir
unset oldincludedir pdfdir psdir sbindir sharedstatedir sysconfdir
-# Unset variables that might influcence "make distcheck".
+# Unset variables that might influence "make distcheck".
unset DISTCHECK_CONFIGURE_FLAGS AM_DISTCHECK_CONFIGURE_FLAGS
# Used by install rules for info files.
unset AM_UPDATE_INFO_DIR