-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
43 lines (34 loc) · 1.34 KB
/
Makefile
File metadata and controls
43 lines (34 loc) · 1.34 KB
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
38
39
40
41
42
43
PROJECT_NAME := occurrence
NVIM_VERSION := 0.10.0
LUA_PATH := './lua_modules/share/lua/5.1/?.lua;./lua_modules/share/lua/5.1/?/init.lua;;'
LUA_CPATH := './lua_modules/lib/lua/5.1/?.so;;'
./lua_modules/bin/%:
@mkdir -p $(@D)
@mkdir -p .luarocks
@luarocks config --scope project lua_version 5.1
@luarocks install $*
./vendor/panvimdoc/panvimdoc.sh:
@mkdir -p $(@D)
@git clone git@github.com:kdheepak/panvimdoc.git $(@D)
./doc/%.txt: ./vendor/panvimdoc/panvimdoc.sh README.md Makefile
@mkdir -p $(@D)
@$< --project-name "$*" --input-file "$(word 2,$^)" --vim-version "NVIM >= $(NVIM_VERSION)"
./doc/tags: README.md Makefile
@mkdir -p $(@D)
@printf "%s\n" "Generating help tags in $(@D)"
@printf "%s\n" "nvim --headless -c 'helptags $(@D)' -c q"
@nvim --headless -c "helptags $(@D)" -c q
.PHONY: doc
doc: ./doc/$(PROJECT_NAME).txt ./doc/tags
# Allow passing arguments after target name
%:
@:
.PHONY: test
test: ./lua_modules/bin/busted ./lua_modules/bin/nlua
@LUA_PATH=$(LUA_PATH) LUA_CPATH=$(LUA_CPATH) $< --lua $(word 2,$^) --exclude-pattern=perf_* $(or $(filter-out $@,$(MAKECMDGOALS)),tests/)
.PHONY: test-perf
test-perf: ./lua_modules/bin/busted ./lua_modules/bin/nlua
@LUA_PATH=$(LUA_PATH) LUA_CPATH=$(LUA_CPATH) $< --lua $(word 2,$^) $(or $(filter-out $@,$(MAKECMDGOALS)),tests/perf_*)
.PHONY: install-hooks
install-hooks:
@./git-hooks/install.sh