-
-
Notifications
You must be signed in to change notification settings - Fork 35
/
Makefile
127 lines (101 loc) · 2.56 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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
PWD=$(shell pwd)
NVIM=$(shell which nvim)
PLUGIN_NAME = iced
VITAL_MODULES = \
Async.Promise \
Data.Dict \
Data.List \
Data.String \
Data.String.Interpolation \
Locale.Message \
Vim.Buffer \
Vim.BufferManager \
Vim.Message
.PHONY: help
help:
@echo "Defined tasks:\n\
vital Update vital modules\n\
test Run following tests\n\
- themis\n\
- themis_nvim\n\
- python_doctest\n\
- bb_script_test\n\
document Generate document html files to target/html\n\
lint Run following linters\n\
- vim-lint\n\
- clj-lint\n\
bin Generate bin/iced from clj/template/iced.bash\n\
outdated Check dependencies are outedated or not\n\
"
.PHONY: vital
vital:
\rm -rf autoload/vital*
vim -c "Vitalize . --name=$(PLUGIN_NAME) $(VITAL_MODULES)" -c q
.PHONY: test
test: themis themis_nvim python_doctest bb_script_test
.vim-themis:
git clone https://github.com/thinca/vim-themis .vim-themis
.vim-sexp:
git clone https://github.com/guns/vim-sexp .vim-sexp
.PHONY: themis
themis: .vim-themis .vim-sexp
./.vim-themis/bin/themis
.PHONY: themis_nvim
themis_nvim:
THEMIS_VIM=$(NVIM) ./.vim-themis/bin/themis
.PHONY: document
document: doc/vim-iced.txt
bash scripts/html.sh
bash scripts/asciidoctor.sh
.PHONY: serve_document
serve_document:
(cd target/html && clj -Sdeps '{:deps {nasus/nasus {:mvn/version "LATEST"}}}' -m http.server)
target/bin/vint:
mkdir -p target
pip3 install -r requirements.txt -t ./target
.PHONY: lint
lint: vim-lint clj-lint
.PHONY: vim-lint
vim-lint: target/bin/vint
bash scripts/lint.sh
bin/clj-kondo:
cd bin && bash ../installer/clj-kondo.sh
.PHONY: clj-lint
clj-lint: bin/clj-kondo
./bin/clj-kondo --lint clj:test/clj
.PHONY: python_doctest
python_doctest:
python3 -m doctest python/bencode.py
.PHONY: bb_script_test
bb_script_test:
bash scripts/bb_script_test.sh
.PHONY: version_check
version_check:
bash scripts/version_check.sh
.PHONY: deps_check
deps_check:
bash scripts/deps_check.sh
.PHONY: check
check: version_check deps_check
.PHONY: coverage
coverage: target/bin/vint themis
bash scripts/coverage.sh
.PHONY: clean
clean:
\rm -rf target .cpcache .vim-sexp .vim-themis
.PHONY: clean-all
clan-all: clean
\rm -rf autoload/vital*
\rm -f bin/iced
.PHONY: bin
bin:
clojure -M:jackin
.PHONY: outdated
outdated:
clojure -M:outdated --upgrade
.PHONY: repl
repl:
clojure -R:jackin:dev -m iced-repl
.PHONY: benchmark
benchmark:
vim -u NONE -i NONE -n -N --cmd 'source scripts/bencode_benchmark.vim'