summaryrefslogtreecommitdiff
path: root/Makefile.in
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2019-05-03 14:19:26 -0700
committerPaul Eggert <eggert@cs.ucla.edu>2019-05-03 14:54:38 -0700
commitb5376e0ebd7b62f00c1b64aef87cd8d96cfbc71a (patch)
tree4c549292720246066a8d6ea72d6810b2fdc5d701 /Makefile.in
parentdae48faec640bba57a42c1a81cc0ab6703a2ddbd (diff)
downloademacs-b5376e0ebd7b62f00c1b64aef87cd8d96cfbc71a.tar.gz
Skip tests if test subdir is missing
Problem reported by Jeffrey Walton in: https://lists.gnu.org/r/emacs-devel/2019-05/msg00041.html * Makefile.in (CHECK_TARGETS): New macro; use it to simplify 'check' and similar rules. ($(CHECK_TARGETS)): If tests are missing, do not fail after issuing a diagnostic. Just skip the tests.
Diffstat (limited to 'Makefile.in')
-rw-r--r--Makefile.in18
1 files changed, 8 insertions, 10 deletions
diff --git a/Makefile.in b/Makefile.in
index 06da415a4ab..21362a91963 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -950,17 +950,15 @@ extraclean: $(extraclean_dirs:=_extraclean)
TAGS tags: lib lib-src # src
$(MAKE) -C src tags
-.PHONY: have-tests
-have-tests:
- @if test ! -d test; then \
- echo "You do not seem to have the test/ directory."; \
- echo "Maybe you are using a release tarfile, rather than a repository checkout."; \
- exit 1; \
- fi
-
-.PHONY: check check-maybe check-expensive check-all
-check check-maybe check-expensive check-all: have-tests all
+CHECK_TARGETS = check check-maybe check-expensive check-all
+.PHONY: $(CHECK_TARGETS)
+$(CHECK_TARGETS): all
+ifeq ($(wildcard test),test)
$(MAKE) -C test $@
+else
+ @echo "You do not seem to have the test/ directory."
+ @echo "Maybe you used a release tarfile that lacks tests."
+endif
dist:
cd ${srcdir}; ./make-dist