-
Notifications
You must be signed in to change notification settings - Fork 106
/
Makefile.user
41 lines (31 loc) · 1.07 KB
/
Makefile.user
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
.DEFAULT_GOAL := all
.PHONY: all
all::
opam exec -- dune build --root . @install
.PHONY: deps
deps: ## Install development dependencies
opam install -y ocamlformat merlin
opam install --deps-only --with-test --with-doc -y .
.PHONY: create_switch
create_switch:
opam switch create . --no-install -y
.PHONY: switch
switch: create_switch deps ## Create an opam switch and install development dependencies
.PHONY: build
build:: ## Build the project, including non installable libraries and executables
opam exec -- dune build --root .
.PHONY: start
start: all ## Run the produced executable
opam exec -- dune build @run --force --no-buffer
.PHONY: test
test: ## Run the unit tests
opam exec -- dune build --root . @test/runtest -f
.PHONY: clean
clean:: ## Clean build artifacts and other generated files
opam exec -- dune clean --root .
.PHONY: fmt
fmt: ## Format the codebase with ocamlformat
opam exec -- dune build --root . --auto-promote @fmt
.PHONY: watch
watch: ## Watch for the filesystem and rebuild on every change
opam exec -- dune build @run -w --force --no-buffer