-
Notifications
You must be signed in to change notification settings - Fork 2
/
Makefile
71 lines (57 loc) · 1.7 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
# Frontend to dune.
.PHONY: default vendor build doc install uninstall test coverage report clean
vendor:
opam install . --deps-only --yes
default: build
build: vendor
dune build
doc-index:
# echo "" > docs/index.md
# echo "---" >> docs/index.md
# echo "---" >> docs/index.md
# cat README.md >> docs/index.md
cp README.md docs/index.md
doc: build
opam install odoc --yes
rm -rf docs/apiref
mkdir -p docs/apiref
dune build @doc
make doc-index
mv _build/default/_doc/_html/* docs/apiref/
### Alcotest environment variables:
#
# - ALCOTEST_VERBOSE=1
# - ALCOTEST_QUICK_TESTS=1
# - ALCOTEST_SHOW_ERRORS=1
#
test: build
dune build @test/spec/runtest -f --no-buffer -j 1
bench: clean build
opam install core_bench --yes
opam depext conf-secp256k1 secp256k1 --install
dune build @test/bench/runtest -f --no-buffer -j 1 --auto-promote \
--diff-command="git diff --unified=10 --break-rewrites --no-index --exit-code --histogram --word-diff=none --color --no-prefix" || echo \
"\n\n=== Differences detected! ===\n\n"
install: build
dune install
uninstall:
dune uninstall
coverage: clean
rm -rf docs/coverage
rm -vf `find . -name 'bisect*.out'`
mkdir -p docs/coverage
BISECT_ENABLE=YES make test
bisect-ppx-report -html coverage/ -I _build/default `find . -name 'bisect*.out'`
make doc-index
mv coverage/* docs/coverage/
bisect-ppx-report -I _build/default/ -text - `find . -name 'bisect*.out'`
report: coverage
opam install ocveralls --yes
ocveralls --prefix '_build/default' `find . -name 'bisect*.out'` --send
blacklist: build
irmin init --bare --root=${HOME}/.hieroglyphs/state
clean:
dune clean
# Optionally, remove all files/folders ignored by git as defined
# in .gitignore (-X).
# git clean -dfXq