From: Stefano Lattarini Date: Mon, 30 Jul 2012 09:25:03 +0000 (+0200) Subject: [ng] check: deps for 'check' target listed in '$(am.test-suite.deps)' X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=286a4487155812a21030853547e47a0f1e765747;p=thirdparty%2Fautomake.git [ng] check: deps for 'check' target listed in '$(am.test-suite.deps)' * automake.in (handle_all_and_check, handle_tests): Drop transform 'CHECK-DEPS' when processing (respectively) the files 'check-target.am' and 'parallel-tests.am'. (generate_makefile): Define '$(am.test-suite.deps)' as the list of dependencies for the 'check' target. * lib/am/parallel-tests.am, lib/am/check-target.am: Use it instead of the transform '%CHECK-DEPS%'. Signed-off-by: Stefano Lattarini --- diff --git a/automake.in b/automake.in index cb3bd665c..f7055c57e 100644 --- a/automake.in +++ b/automake.in @@ -3906,7 +3906,6 @@ sub handle_all_and_check () 'LOCAL-HEADERS' => "@local_headers"); almost_verbatim ('check-target', - 'CHECK-DEPS' => "@check", 'CHECK-TESTS' => "@check_tests"); } @@ -4110,7 +4109,7 @@ sub handle_tests else { require_conf_file ("parallel-tests", FOREIGN, 'test-driver'); - almost_verbatim ('parallel-tests', 'CHECK-DEPS' => "@check"); + almost_verbatim ('parallel-tests'); } } } @@ -6910,6 +6909,10 @@ sub generate_makefile ($$) define_variable 'am.all-progs', INTERNAL, sort keys %known_programs; define_variable 'am.all-libs', INTERNAL, sort keys %known_libraries; define_variable 'am.all-ltlibs', INTERNAL, sort keys %known_ltlibraries; + # Must come after invocation of several of the 'handle_*' functions + # above, which can declare additional dependencies for the 'check' + # target. + define_variable ('am.test-suite.deps', INTERNAL, @check); handle_tests; # This must come after most other rules. diff --git a/lib/am/check-target.am b/lib/am/check-target.am index 225c5667d..dba23d146 100644 --- a/lib/am/check-target.am +++ b/lib/am/check-target.am @@ -26,7 +26,7 @@ endif # local check dependencies, and finally run the actual tests (as given # by $(TESTS), by DejaGNU, and by the 'check-local' target). check-am: all-am - $(if %CHECK-DEPS%,$(MAKE) %CHECK-DEPS%,@:) + $(if $(am.test-suite.deps),$(MAKE) $(am.test-suite.deps),@:) $(MAKE) %CHECK-TESTS% check-local check: $(if $(SUBDIRS),check-recursive,check-am) diff --git a/lib/am/parallel-tests.am b/lib/am/parallel-tests.am index 116d17825..5297c6735 100644 --- a/lib/am/parallel-tests.am +++ b/lib/am/parallel-tests.am @@ -439,7 +439,7 @@ endif # Recheck must depend on $(check_SCRIPTS), $(check_PROGRAMS), etc. # It must also depend on the 'all' target. See automake bug#11252. -recheck: all %CHECK-DEPS% +recheck: all $(am.test-suite.deps) +$(am.setup-test-harness-workdir) ## See comments above in the check-TESTS recipe for why remove ## $(TEST_SUITE_LOG) here.