Merge branch 'master' into testsuite-work
[platform/upstream/automake.git] / Makefile.am
index 6f7554d..09706ff 100644 (file)
@@ -25,6 +25,8 @@
 ## run aclocal and automake.
 SUBDIRS = lib . doc m4 tests
 
+TEST_SUBDIRS = lib/Automake/tests tests
+
 bin_SCRIPTS = automake aclocal
 
 CLEANFILES = $(bin_SCRIPTS)
@@ -102,8 +104,6 @@ INSTALL: lib/INSTALL
        $(AM_V_GEN)cp $(srcdir)/lib/INSTALL $@
 
 ## recheck: convenience proxy target for the test suites.
-TEST_SUBDIRS = lib/Automake/tests tests
-
 .PHONY: recheck
 recheck:
        @failcom='exit 1'; \
@@ -212,7 +212,24 @@ sc_at_in_texi
 
 .PHONY: $(syntax_check_rules)
 $(syntax_check_rules): automake aclocal
-maintainer-check: $(syntax_check_rules)
+
+## Check that the list of tests given in the Makefile is equal to the
+## list of all test scripts in the Automake testsuite.
+.PHONY: maintainer-check-list-of-tests
+maintainer-check-list-of-tests:
+       @failcom='exit 1'; \
+       for f in x $$MAKEFLAGS; do \
+         case $$f in \
+           *=* | --[!k]*);; \
+           *k*) failcom='fail=yes';; \
+         esac; \
+       done; \
+       for subdir in $(TEST_SUBDIRS); do \
+         (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $@) || eval $$failcom; \
+       done; \
+       test -z "$$fail"
+
+maintainer-check: $(syntax_check_rules) maintainer-check-list-of-tests
 
 ## Look for test whose names can cause spurious failures when used as
 ## first argument to AC_INIT (chiefly because they might contain an