-
Notifications
You must be signed in to change notification settings - Fork 10
/
Makefile
37 lines (29 loc) · 1 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
# Allow to override the vim to use, e.g. /opt/vim-travis/bin/vim.
export VIM_BIN?=vim
test: | test/vader.vim
test/run
# Interactive tests, keep Vader open.
testi: export VADER_KEEP=1
testi:
test/run
# Manually invoke Vim, using the test setup.
# -X: do not connect to X server.
runvim:
cd test && HOME=/dev/null $(VIM_BIN) -XNu vimrc -i viminfo
# Target for Travis (which sets CI=true already, but this allows to simulate it).
travis: CI=true
travis: test
test/vader.vim:
git clone --depth=1 -b display-source-with-exceptions https://github.com/blueyed/vader.vim $@
# Add targets for .vader files, absolute and relative.
# This can be used with `b:dispatch = ':Make %'` in Vim.
TESTS:=$(filter-out test/_%.vader,$(wildcard test/*.vader))
uniq = $(if $1,$(firstword $1) $(call uniq,$(filter-out $(firstword $1),$1)))
_TESTS_REL_AND_ABS:=$(call uniq,$(abspath $(TESTS)) $(TESTS))
$(_TESTS_REL_AND_ABS):
test/run $@
.PHONY: $(_TESTS_REL_AND_ABS)
tags:
ctags -R --langmap=vim:+.vader
.PHONY: tags
.PHONY: test travis