task_register() conversion: play task
[paraslash.git] / t / makefile.test
1 RM ?= rm -f
2
3 results_dir := $(test_dir)/test-results
4 trash_dir := $(test_dir)/trashes
5
6 test_options := --executables-dir $(shell pwd)
7 test_options += --results-dir $(results_dir)
8 test_options += --trash-dir $(trash_dir)
9 test_options += --executables "$(prefixed_executables)"
10 test_options += --objects "$(basename $(all_objs))"
11 test_options += --man-dir $(man_dir)
12
13 ifdef V
14 ifeq ("$(origin V)", "command line")
15 test_options += --verbose=$(V)
16 endif
17 endif
18
19 tests := $(sort $(wildcard $(test_dir)/t[0-9][0-9][0-9][0-9]-*.sh))
20
21 test: $(tests)
22
23 $(tests): all
24 $(Q) $@ $(test_options)
25
26 test-help:
27 $(Q) for t in $(tests); do $$t $(test_options) -h; done
28
29 test-clean:
30 $(RM) -r $(results_dir)
31 $(RM) -r $(trash_dir)
32
33 .PHONY: $(tests) test-help