maint: sanity checks in 'check-minimal-autoconf' convenience target
authorStefano Lattarini <stefano.lattarini@gmail.com>
Tue, 28 May 2013 14:24:41 +0000 (16:24 +0200)
committerStefano Lattarini <stefano.lattarini@gmail.com>
Tue, 28 May 2013 14:32:41 +0000 (16:32 +0200)
* maint.mk (check-minimal-autoconf): Here, check that autoconf seems
to be locally installed, and that such local install refers to the
correct expected minimal version.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
maint.mk

index fe09135..54bff42 100644 (file)
--- a/maint.mk
+++ b/maint.mk
@@ -518,6 +518,12 @@ build-minimal-autoconf:
 .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 \
@@ -527,7 +533,13 @@ check-minimal-autoconf:
          && 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