-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
46 lines (33 loc) · 996 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
.PHONY: all test build clean check-lint lint doc utop
all: build
# [make build] (or [make]) will build the source
build:
dune build
# [make test] run all test
test:
dune runtest --no-buffer -j 1
# [make clean] remove build artifacts (essentially the
# "_build/" folder)
clean:
dune clean
# [make doc] build the documentation (using odoc)
doc: build
dune build @doc
# [make utop] launch an REPL with the whole package in
# the context
utop:
dune utop
# [make check-lint] ensure that the code is properly formatted
# according to the ".ocamlformat" file
check-lint:
dune build @fmt
# [make lint] apply formatting according to the ".ocamlformat" file
lint:
dune build @fmt --auto-promote
# Setting up the development environment
.PHONY: deps
# [make deps] will download locally the dependencies needed
# to build the libraries. That is, all the dependencies referenced
# in the OPAM description files.
deps:
opam install . --deps-only --with-doc --with-test --with-dev-setup -y