-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
53 lines (41 loc) · 927 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
ifeq (start,$(firstword $(MAKECMDGOALS)))
START_ARGS := $(wordlist 2,$(words $(MAKECMDGOALS)),$(MAKECMDGOALS))
$(eval $(START_ARGS):;@:)
endif
.PHONY: all
all:
opam exec -- dune build @install
.PHONY: dev
dev:
opam install -y dune-release merlin ocamlformat utop
opam install --deps-only --with-test --with-doc -y .
.PHONY: build
build:
opam exec -- dune build
.PHONY: install
install:
opam exec -- dune install
.PHONY: start
start: all
opam exec -- dune exec bin/main.exe $(START_ARGS)
.PHONY: test
test:
opam exec -- dune build @test/runtest -f
.PHONY: clean
clean:
opam exec -- dune clean
.PHONY: doc
doc:
opam exec -- dune build @doc
.PHONY: doc-path
doc-path:
@echo "_build/default/_doc/_html/index.html"
.PHONY: format
format:
opam exec -- dune build @fmt --auto-promote
.PHONY: watch
watch:
opam exec -- dune build --watch
.PHONY: utop
utop:
opam exec -- dune utop lib -- -implicit-bindings