-
Notifications
You must be signed in to change notification settings - Fork 7
/
Makefile
40 lines (28 loc) · 867 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
build:
@dune build @all @install
doc:
@dune build @doc
all: build doc
clean:
@dune clean
test: build
@dune runtest --no-buffer -f
lock:
dune build ./ocplib-simplex.opam
opam lock ./ocplib-simplex.opam -w
# Remove OCaml compiler constraints
sed -i '/"ocaml"\|"ocaml-base-compiler"\|"ocaml-system"\|"ocaml-config"/d' ./ocplib-simplex.opam.locked
WATCH?= @all
watch:
@dune build $(WATCH) -w
install: build
@dune install
uninstall:
@dune uninstall
reindent:
@find src '(' -name '*.ml' -or -name '*.mli' ')' -print0 | xargs -0 echo "reindenting: "
@find src '(' -name '*.ml' -or -name '*.mli' ')' -print0 | xargs -0 sed -i 's/[[:space:]]*$$//'
@find src '(' -name '*.ml' -or -name '*.mli' ')' -print0 | xargs -0 ocp-indent -i
opam-deps:
opam install . --deps-only
.PHONY: build doc all clean test lock watch install uninstall reindent opam-deps