forked from mtt-lang/mtt-lang
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
46 lines (36 loc) · 987 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
# Dependencies useful for development and CI
# Check the required ocamlformat's version in .ocamlformat file
DEV_DEPS := \
merlin \
ocamlformat \
ocp-indent \
utop
all:
dune build
test:
dune runtest
promote:
dune promote
# an alias for promoting tests
gold:
dune promote
# Autoformat sources inplace (needs ocamlformat installed)
fmt:
dune build @fmt --auto-promote
# Update src/ParserErrors.messages
update-messages:
menhir --list-errors src/Parser.mly >src/NewParserErrorsStubs.messages
menhir --merge-errors src/ParserErrors.messages \
--merge-errors src/NewParserErrorsStubs.messages \
src/Parser.mly >src/NewParserErrors.messages
mv src/NewParserErrors.messages src/ParserErrors.messages
rm src/NewParserErrorsStubs.messages
# CI: lint OCaml and dune source files, all the opam files in the project root
lint:
dune build @fmt
opam lint .
dev-deps:
opam install -y $(DEV_DEPS)
clean:
dune clean || true
.PHONY: all test gold fmt lint dev-deps clean