-
-
Notifications
You must be signed in to change notification settings - Fork 25
/
Makefile
93 lines (75 loc) · 2.16 KB
/
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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
export
CARAMEL = $(PWD)/caramel.exe
CARAMEL_STDLIB_PATH ?= $(PWD)/_build/default/stdlib
.PHONY: build
build:
dune build @all
.PHONY: watch
watch:
dune build @all --watch
.PHONY: manual
manual:
mdbook build --dest-dir ../docs/manual ./manual
.PHONY: uninstall
uninstall:
dune uninstall
.PHONY: install
install:
dune install
.PHONY: setup
setup:
opam install ./erlang/erlang.opam
opam install --deps-only --with-test ./vendor/ocamlformat-0.17.0/ocamlformat_lib.opam
opam install --deps-only --with-test ./vendor/ocaml-lsp-1.4.0/jsonrpc.opam
opam install --deps-only --with-test ./vendor/ocaml-lsp-1.4.0/lsp.opam
opam install --deps-only --with-test ./vendor/ocaml-lsp-1.4.0/ocaml-lsp-server.opam
opam install --deps-only ./caramel.opam
.PHONY: test
test:
dune runtest ./erlang/tests -p erlang
dune runtest ./tests -p caramel
.PHONY: coverage
coverage:
dune runtest --instrument-with bisect_ppx --force
bisect-ppx-report html --expect src
.PHONY: prerel
prerel:
dune build @install
dune install --prefix=_release/caramel --force --sandbox=copy --release
rm -rf _release/caramel/bin/erl*
rm -rf _release/caramel/doc/
rm -rf _release/caramel/lib/ocaml-lsp-server
rm -rf _release/caramel/lib/caramel/compiler
rm -rf _release/caramel/lib/caramel/formatter
rm -rf _release/caramel/lib/caramel/lsp
rm -rf _release/caramel/lib/caramel/verify
rm -rf _release/caramel/lib/erlang
rm -rf _release/caramel/lib/jsonrpc
rm -rf _release/caramel/lib/lsp
rm -rf _release/caramel/lib/ocamlformat_lib
rm -rf _release/caramel/lib/stublibs
.PHONY: release
release: prerel
strip _release/caramel/bin/caramel
tar czf release.tar.gz -C _release caramel
.PHONY: release
release.win: prerel
tar czf release.tar.gz -C _release caramel
release-erlang:
rm -f _build/*.tbz
dune-release distrib --skip-build --skip-lint --skip-tests -p erlang
mv _build/caramel*.tbz erlang.tbz
.PHONY: opam-publish
opam-publish: build
dune-release distrib --skip-build --skip-tests -p erlang -n erlang
dune-release opam pkg -p erlang -n erlang
dune-release opam submit -p erlang -n erlang
.PHONY: promote
promote:
dune promote
.PHONY: fmt
fmt:
dune build @fmt --auto-promote
.PHONY: clean
clean:
dune clean