-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathMakefile
51 lines (36 loc) · 1.04 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
all: build test
build:
@dune build @install
test:
@dune runtest --no-buffer --force
clean:
@dune clean
doc:
@dune build @doc
format:
@dune build @fmt --auto-promote
DUNE_OPTS ?= --profile=release
BENCH_TARGETS= benchs.exe bench_persistent_read.exe bench_persistent.exe
benchs:
@for i in $(BENCH_TARGETS) ; do \
echo "run benchmark $$i" ; \
dune exec $(DUNE_OPTS) "benchs/$$i" ; done
build-benchs:
@dune build $(DUNE_OPTS) $(addprefix benchs/, $(BENCH_TARGETS))
bench-persistent:
@dune exec $(DUNE_OPTS) benchs/bench_persistent.exe
bench-persistent-read:
@dune exec $(DUNE_OPTS) benchs/bench_persistent_read.exe
benchs-iter:
@dune exec $(DUNE_OPTS) benchs/benchs.exe
examples:
dune exec examples/test_sexpr.exe
VERSION=$(shell awk '/^version:/ {print $$2}' iter.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
WATCH ?= @install
watch:
dune build $(WATCH) -w
.PHONY: benchs tests examples update_next_tag