forked from OCamlPro/ocaml-canvas
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
68 lines (46 loc) · 1.18 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
.PHONY: all build build-deps fmt fmt-check install dev-deps test
.PHONY: doc-common odoc view sphinx
.PHONY: clean distclean
DEV_DEPS := merlin ocamlformat odoc ppx_expect ppx_inline_test
SPHINX_TARGET:=_build/docs/sphinx
ODOC_TARGET:=_build/docs/doc/.
all: build
build:
-opam exec -- dune build @configure --auto-promote
opam exec -- dune build @all
build-deps:
if ! [ -e _opam ]; then \
opam switch create . 4.14.0 ; \
fi
opam install ./*.opam --deps-only
doc-common: build
mkdir -p _build/docs
rsync -auv docs/. _build/docs/.
sphinx: doc-common
sphinx-build sphinx ${SPHINX_TARGET}
odoc: doc-common
mkdir -p ${ODOC_TARGET}
opam exec -- dune build @doc
rsync -auv --delete _build/default/_doc/_html/. ${ODOC_TARGET}
doc: doc-common odoc sphinx
view:
xdg-open file://$$(pwd)/_build/docs/index.html
fmt:
opam exec -- dune build @fmt --auto-promote
fmt-check:
opam exec -- dune build @fmt
install:
opam pin -y --no-action -k path .
opam install -y .
opam:
opam pin -k path .
uninstall:
opam uninstall .
dev-deps:
opam install ./*.opam --deps-only --with-doc --with-test
test:
opam exec -- dune build @runtest
clean:
rm -rf _build
distclean: clean
rm -rf _opam