]> Sergey Matveev's repositories - zsh-autoenv.git/blob - Makefile
Makefile: add clean target
[zsh-autoenv.git] / Makefile
1 export ZDOTDIR=${CURDIR}/tests/ZDOTDIR
2
3 test:
4         cram --shell=zsh -v tests
5
6 itest:
7         cram -i --shell=zsh tests
8
9 # Run tests with all ZDOTDIRs.
10 test_full:
11         for i in $(wildcard tests/ZDOTDIR*); do \
12                 echo "ZDOTDIR=$$i"; \
13                 ZDOTDIR=${CURDIR}/$$i cram --shell=zsh -v tests; \
14                 echo; \
15         done
16
17 # Define targets for test files, with relative and abolute path.
18 # Use verbose output, which is useful with Vim's 'errorformat'.
19 TESTS:=$(wildcard tests/*.t)
20
21 uniq = $(if $1,$(firstword $1) $(call uniq,$(filter-out $(firstword $1),$1)))
22 _TESTS_REL_AND_ABS:=$(call uniq,$(abspath $(TESTS)) $(TESTS))
23 $(_TESTS_REL_AND_ABS):
24         cram --shell=zsh -v $@
25 .PHONY: $(_TESTS_REL_AND_ABS)
26
27 .PHONY: itest test
28
29 clean:
30         $(RM) tests/*.err