-tests: matitac matitadep matitaclean
- @(cd library && make MATITAC="- ../scripts/do_tests.sh $(DO_TESTS_OPTS) ../matitac ../matitaclean /dev/null" clean all)
- @(cd tests && make MATITAC="- ../scripts/do_tests.sh $(DO_TESTS_OPTS) ../matitac ../matitaclean /dev/null" clean all)
- @(cd contribs/LAMBDA-TYPES && make MATITAC="- ../../scripts/do_tests.sh $(DO_TESTS_OPTS) ../../matitac ../../matitaclean /dev/null" clean all)
- @(cd contribs/PREDICATIVE-TOPOLOGY && make MATITAC="- ../../scripts/do_tests.sh $(DO_TESTS_OPTS) ../../matitac ../../matitaclean /dev/null" clean all)
-tests.opt: matitac.opt matitadep.opt matitaclean.opt
- @(cd library && make MATITAC="- ../scripts/do_tests.sh $(DO_TESTS_OPTS) ../matitac.opt ../matitaclean.opt /dev/null" clean.opt opt)
- @(cd tests && make MATITAC="- ../scripts/do_tests.sh $(DO_TESTS_OPTS) ../matitac.opt ../matitaclean.opt /dev/null" clean.opt opt)
- @(cd contribs/LAMBDA-TYPES && make MATITAC="- ../../scripts/do_tests.sh $(DO_TESTS_OPTS) ../../matitac.opt ../../matitaclean.opt /dev/null" clean.opt opt)
- @(cd contribs/PREDICATIVE-TOPOLOGY && make MATITAC="- ../../scripts/do_tests.sh $(DO_TESTS_OPTS) ../../matitac.opt ../../matitaclean.opt /dev/null" clean.opt opt)
-cleantests: matitaclean
- @(cd library && make clean)
- @(cd tests && make clean)
- @(cd contribs/LAMBDA-TYPES && make clean)
- @(cd contribs/PREDICATIVE-TOPOLOGY && make clean)
-.PHONY: tests tests.opt cleantests
+TEST_DIRS = \
+ library \
+ tests \
+ tests/bad_tests \
+ contribs/LAMBDA-TYPES \
+ contribs/PREDICATIVE-TOPOLOGY \
+ $(NULL)
+
+.PHONY: tests tests.opt cleantests cleantests.opt
+tests: $(foreach d,$(TEST_DIRS),$(d)-test)
+tests.opt: $(foreach d,$(TEST_DIRS),$(d)-test-opt)
+cleantests: $(foreach d,$(TEST_DIRS),$(d)-cleantests)
+cleantests.opt: $(foreach d,$(TEST_DIRS),$(d)-cleantests-opt)
+
+%-test: matitac matitadep matitaclean coq.moo
+ -cd $* && make -k clean all
+%-test-opt: matitac.opt matitadep.opt matitaclean.opt
+ -cd $* && make -k clean.opt opt
+%-cleantests: matitaclean
+ -cd $* && make clean
+%-cleantests-opt: matitaclean.opt
+ -cd $* && make clean.opt