-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathMakefile
61 lines (47 loc) · 1.21 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
.PHONY: release discover-tests test promote clean celan doc
# compiler packages without tests
all:
dune build $(DFLAGS)
release: DFLAGS += --profile=release
release: all
discover-tests:
echo "" > regression/dune.tests
$(RM) -fr _build/default/config
dune build @discover-tests
cp _build/default/config/*.t regression/
doc:
dune build @doc $(DFLAGS)
doc-sphinx:
echo TODO
test:
dune runtest $(DFLAGS)
promote:
dune promote $(DFLAGS)
celan: clean
clean:
$(RM) -r _build _coverage
rebuild: clean
$(MAKE) all tests
watch:
$(MAKE) all DFLAGS=-w
install:
dune build @install $(DFLAGS)
dune install $(DFLAGS)
uninstall:
dune build @install $(DFLAGS)
dune uninstall $(DFLAGS)
.PHONY: odig
ODIG_SWITCHES = --odoc-theme=odig.gruvbox.light
ODIG_SWITCHES += --no-tag-index
ODIG_SWITCHES += --no-pkg-deps
odig:
odig odoc $(ODIG_SWITCHES) GT
.PHONY: coverage
TEST_COV_D ?= /tmp/GTcov
coverage:
if [ -d $(TEST_COV_D) ]; then $(RM) -r $(TEST_COV_D); fi
mkdir -p $(TEST_COV_D)
BISECT_FILE=$(TEST_COV_D)/GT dune runtest --no-print-directory \
--instrument-with bisect_ppx --force
bisect-ppx-report html --coverage-path $(TEST_COV_D) #--expect src/
bisect-ppx-report summary --coverage-path $(TEST_COV_D) #--expect src/