]> code.delx.au - gnu-emacs-elpa/blob - packages/load-relative/test/Makefile.am
df1647fcb5a54aeba23d7e3048fb0b2cc5761f7f
[gnu-emacs-elpa] / packages / load-relative / test / Makefile.am
1 include $(top_srcdir)/common.mk
2
3 PHONY=check test all check-elget test-elget help
4
5 #: overall help on running the make targets
6 help:
7 @echo "The main function of this Makefile is to facilitate running tests."
8 @echo
9 @echo "To run all of the tests, use targets \"test\", \"check\" or \"check-short\"."
10 @echo "For example:"
11 @echo
12 @echo " make check"
13 @echo "or:"
14 @echo " make check-short"
15 @echo
16 @echo "The -short target uses a filter written in Ruby to remove extreanous output."
17 @echo
18 @echo "To run a specific test like test-srcbuf.el, change \".el\" to"
19 @echo "\".run\". For example:"
20 @echo
21 @echo " make test-srcbuf.run"
22 @echo
23 @echo "Tests can also be run via the Emacs el-get package and this loads dependent emacs "
24 @echo "package, like load-relative. To do this, use targets, \"check-elget\","
25 @echo "\"test-elget\", or \"check-short-elget\"."
26 @echo
27 @echo "To run a specific test like test-srcbuf.el via el-get change \".el\""
28 @echo "to \".elrun\" For example:"
29 @echo
30 @echo " make test-srcbuf.elrun"
31
32 #: same thing as "check"
33 test: check
34
35 test_files := $(wildcard test-*.el)
36
37 CHECK_FILES = $(notdir $(test_files:.el=.run))
38 EL_GET_CHECK_FILES = $(notdir $(test_files:.el=.elrun))
39
40 #: Run all tests
41 check: $(CHECK_FILES)
42
43 #: Run all tests via el-get
44 check-elget: $(EL_GET_CHECK_FILES)
45
46 #: Run all tests with minimum verbosity
47 check-short:
48 $(MAKE) check 2>&1 | ruby ../make-check-filter.rb
49
50 #: Run all tests with minimum verbosity via el-get
51 check-short-elget:
52 $(MAKE) check-elget 2>&1 | ruby ../make-check-filter.rb
53
54 test-%.run:
55 (cd $(top_srcdir)/test && $(EMACS) --batch --no-site-file --no-splash --load $(@:.run=.el))
56
57 #: Run tests using el-get to specify external Lisp dependencies
58 test-%.elrun:
59 (cd $(top_srcdir)/test && $(EMACS) --batch --no-site-file --no-splash --load ../el-get-install.el --load $(@:.elrun=.el))
60
61 # # Whatever it is you want to do, it should be forwarded to the
62 # # to top-level directories
63 # %:
64 # $(MAKE) -C .. $@