diff options
| author | Paul Eggert | 2019-05-03 14:19:26 -0700 |
|---|---|---|
| committer | Paul Eggert | 2019-05-03 14:54:38 -0700 |
| commit | b5376e0ebd7b62f00c1b64aef87cd8d96cfbc71a (patch) | |
| tree | 4c549292720246066a8d6ea72d6810b2fdc5d701 | |
| parent | dae48faec640bba57a42c1a81cc0ab6703a2ddbd (diff) | |
| download | emacs-b5376e0ebd7b62f00c1b64aef87cd8d96cfbc71a.tar.gz emacs-b5376e0ebd7b62f00c1b64aef87cd8d96cfbc71a.zip | |
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.
| -rw-r--r-- | Makefile.in | 18 |
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) | |||
| 950 | TAGS tags: lib lib-src # src | 950 | TAGS tags: lib lib-src # src |
| 951 | $(MAKE) -C src tags | 951 | $(MAKE) -C src tags |
| 952 | 952 | ||
| 953 | .PHONY: have-tests | 953 | CHECK_TARGETS = check check-maybe check-expensive check-all |
| 954 | have-tests: | 954 | .PHONY: $(CHECK_TARGETS) |
| 955 | @if test ! -d test; then \ | 955 | $(CHECK_TARGETS): all |
| 956 | echo "You do not seem to have the test/ directory."; \ | 956 | ifeq ($(wildcard test),test) |
| 957 | echo "Maybe you are using a release tarfile, rather than a repository checkout."; \ | ||
| 958 | exit 1; \ | ||
| 959 | fi | ||
| 960 | |||
| 961 | .PHONY: check check-maybe check-expensive check-all | ||
| 962 | check check-maybe check-expensive check-all: have-tests all | ||
| 963 | $(MAKE) -C test $@ | 957 | $(MAKE) -C test $@ |
| 958 | else | ||
| 959 | @echo "You do not seem to have the test/ directory." | ||
| 960 | @echo "Maybe you used a release tarfile that lacks tests." | ||
| 961 | endif | ||
| 964 | 962 | ||
| 965 | dist: | 963 | dist: |
| 966 | cd ${srcdir}; ./make-dist | 964 | cd ${srcdir}; ./make-dist |