-
Notifications
You must be signed in to change notification settings - Fork 9
/
Makefile
55 lines (43 loc) · 1.25 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
.PHONY: all release watch test promote install deps
all:
dune build
release:
dune build --profile release
watch:
dune test -w
test:
dune build && dune test
promote:
dune test --auto-promote
install:
dune build @install -p reviewer,zanuda
dune install reviewer zanuda
uninstall:
dune build @install
dune uninstall
clean:
@dune clean
@$(RM) -r _coverage
deps:
opam install --confirm-level=yes \
ppx_blob curly dune ppx_expect stdune angstrom sexplib \
ppx_fields_conv ppx_show bisect_ppx
ODIG_SWITCHES = --odoc-theme=odig.gruvbox.light
ODIG_SWITCHES += --no-tag-index
ODIG_SWITCHES += --no-pkg-deps
.PHONY: odig
odig:
odig odoc $(ODIG_SWITCHES) zanuda reviewer
@echo 'To look at the doc run: xdg-open $$(odig cache path)/html/index.html'
TEST_COV_D = /tmp/zanudacov
COVERAGE_OPTS = --coverage-path $(TEST_COV_D) --expect src/ --expect review/ --expect review_tests/
.PHONY: test_coverage coverage
test_coverage: coverage
coverage:
$(RM) -r $(TEST_COV_D)
mkdir -p $(TEST_COV_D)
BISECT_FILE=$(TEST_COV_D)/zanuda dune runtest --no-print-directory \
--instrument-with bisect_ppx --force
bisect-ppx-report html $(COVERAGE_OPTS)
bisect-ppx-report summary $(COVERAGE_OPTS)
@echo "Use 'xdg-open _coverage/index.html' to see coverage report"