summaryrefslogtreecommitdiffstats
path: root/Makefile
blob: 64307380bb178cebaecf4a99e8cd2ed936f34690 (plain)
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
DUNE ?= dune

.DEFAULT_GOAL := help
.PHONY: help test lint format build check clean doc

help:
	@echo 'Targets:'
	@echo '  test       run the test suite'
	@echo '  lint       check formatting with ocamlformat (read-only)'
	@echo '  format     apply ocamlformat (writes)'
	@echo '  build      build the library'
	@echo '  check      lint + test + build, in that order'
	@echo '  doc        build the odoc documentation'
	@echo '  clean      remove build artefacts'

test:
	$(DUNE) runtest --force --no-buffer

lint:
	$(DUNE) build @fmt

format:
	$(DUNE) fmt

build:
	$(DUNE) build @install

check: lint test build

doc:
	$(DUNE) build @doc

clean:
	$(DUNE) clean