forked from fp2022-helper/fp2024
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
54 lines (42 loc) · 1.16 KB
/
Makefile
File metadata and controls
54 lines (42 loc) · 1.16 KB
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
.PHONY: repl tests test fmt lint celan deps
all:
dune build
repl:
dune build ./REPL.exe && rlwrap _build/default/REPL.exe
tests: test
test:
dune runtest
celan: clean
clean:
@$(RM) -r _build _coverage
fmt:
dune build @fmt --auto-promote
lint:
dune build @lint --force
release:
dune build --profile=release
dune runtest --profile=release
install:
dune b @install --profile=release
dune install
ODIG_SWITCHES = --odoc-theme=odig.gruvbox.light
ODIG_SWITCHES += --no-tag-index
ODIG_SWITCHES += --no-pkg-deps
odig:
odig odoc $(ODIG_SWITCHES) Lambda
TEST_COV_D = /tmp/cov
COVERAGE_OPTS = --coverage-path $(TEST_COV_D) --expect lib/ --expect tests/
.PHONY: test_coverage coverage
test_coverage: coverage
coverage:
$(RM) -r $(TEST_COV_D)
mkdir -p $(TEST_COV_D)
BISECT_FILE=$(TEST_COV_D)/langauge dune runtest --no-print-directory \
--instrument-with bisect_ppx --force
bisect-ppx-report html $(COVERAGE_OPTS)
bisect-ppx-report summary $(COVERAGE_OPTS)
@echo "Use 'xdg-open _coverage/index.html' to see coverage report"
DEPS = ocamlformat.0.26.2 ocaml-lsp-server.1.18.0 dune.3.16.0 odig
deps:
opam install --yes $(DEPS)
opam install --yes . --deps-only