]> code.delx.au - gnu-emacs/commitdiff
* Makefile.in: Avoid duplication.
authorGlenn Morris <rgm@gnu.org>
Fri, 4 Dec 2015 00:57:11 +0000 (19:57 -0500)
committerGlenn Morris <rgm@gnu.org>
Fri, 4 Dec 2015 00:57:11 +0000 (19:57 -0500)
(have-tests): New rule.
(check, check-maybe): Use it.

Makefile.in

index 06e5b06570117dcb9a47a8c73c6a03fb51b942e2..57e29d7f983857ce6bd6b542728ac9599712e05c 100644 (file)
@@ -921,22 +921,16 @@ extraclean: $(extraclean_dirs:=_extraclean)
 TAGS tags: lib lib-src src
        $(MAKE) -C src tags
 
-
-check-maybe: all
+.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."; \
-       else \
-         $(MAKE) -C test check-maybe; \
+        exit 1; \
        fi
 
-check: all
-       @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."; \
-       else \
-         $(MAKE) -C test check; \
-       fi
+check check-maybe: have-tests all
+       $(MAKE) -C test $@
 
 dist:
        cd ${srcdir}; ./make-dist