-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
64 lines (49 loc) · 910 Bytes
/
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
all: build
.PHONY: clean
clean:
dune clean
.PHONY: build
build:
dune build @all
.PHONY: fmt
fmt:
dune build @fmt --auto-promote
.PHONY: docs
docs: clean-docs
dune build @doc
.PHONY: copy-docs
copy-docs: docs
cp -r _build/default/_doc/_html/** docs/
.PHONY: open-docs
open-docs: copy-docs
xdg-open docs/index.html
.PHONY: clean-docs
clean-docs:
rm -rf docs/**
.PHONY: test
test:
dune runtest --no-buffer
.PHONY: watch
watch:
dune build @all -w
.PHONY: watch-test
watch-test:
dune runtest --no-buffer -w
.PHONY: utop
utop:
dune utop .
.PHONY: remove-switch
remove-switch:
opam switch remove -y .
.PHONY: dev-tools
dev-tools:
opam install -y merlin ocamlformat utop
.PHONY: 4.06-switch
4.06-switch: remove-switch
opam switch create -y . 4.06.1 -t -d
make dev-tools
.PHONY: default-switch
default-switch: remove-switch
opam switch create -y . -t -d
make dev-tools
eval $(opam env)