-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathMakefile
35 lines (24 loc) · 788 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
all: build test
build:
@dune build @install
test:
@dune runtest --no-buffer --force
clean:
@dune clean
doc:
@dune build @doc
benchs:
@dune build $(addprefix bench/, $(BENCH_TARGETS))
VERSION=$(shell awk '/^version:/ {print $$2}' oseq.opam)
update_next_tag:
@echo "update version to $(VERSION)..."
sed -i "s/NEXT_VERSION/$(VERSION)/g" src/*.ml src/*.mli
sed -i "s/NEXT_RELEASE/$(VERSION)/g" src/*.ml src/*.mli
reindent:
@which ocp-indent || ( echo "require ocp-indent" ; exit 1 )
@find src '(' -name '*.ml' -or -name '*.mli' ')' -type f -print0 | xargs -0 echo "reindenting: "
@find src '(' -name '*.ml' -or -name '*.mli' ')' -type f -print0 | xargs -0 ocp-indent -i
WATCH?=@install
watch:
@dune build $(WATCH) -w
.PHONY: benchs tests examples update_next_tag watch