[PATCH] check-TESTS has dependency on check_PROGRAMS etc

Nicholas Brown <[email protected]>
Newsgroups gmane.comp.sysutils.automake.patches
Message-ID <[email protected]>
Something like:
   ./autogen.sh
   ./configure
   make check-TESTS
will fail, unless 'make check' is run before 'make check-TESTS' for
Makefile.am snippet like:

check_PROGRAMS = foo
check_SCRIPTS = run_foo_wrapper.sh
TESTS = $(check_SCRIPTS)
---
 lib/am/check.am | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/lib/am/check.am b/lib/am/check.am
index 7bcffd53faa8..15cfc7c64598 100644
--- a/lib/am/check.am
+++ b/lib/am/check.am
@@ -401,7 +401,8 @@ RECHECK_LOGS = $(TEST_LOGS)
 ## Running all tests, or rechecking failures. ##
 ## ------------------------------------------ ##
 
-check-TESTS:
+## Running tests depend on $(check_SCRIPTS), $(check_PROGRAMS), etc.
+check-TESTS: %CHECK_DEPS%
 	@list='$(RECHECK_LOGS)';           test -z "$$list" || rm -f $$list
 	@list='$(RECHECK_LOGS:.log=.trs)'; test -z "$$list" || rm -f $$list
 ## We always have to remove $(TEST_SUITE_LOG), to ensure its rule is run
-- 
2.1.4
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.