-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathMakefile
59 lines (43 loc) · 1.26 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
all: build test
build:
@dune build @install
test:
@dune runtest --no-buffer --force
clean:
@dune clean
doc:
@dune build @doc
BENCH_TARGETS= benchs.exe bench_persistent_read.exe bench_persistent.exe
benchs:
@for i in $(BENCH_TARGETS) ; do \
echo "run benchmark $$i" ; \
dune exec "src/bench/$$i" ; done
build-benchs:
@dune build $(addprefix src/bench/, $(BENCH_TARGETS))
examples:
dune build 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:
while find src/ -print0 | xargs -0 inotifywait -e delete_self -e modify ; do \
echo "============ at `date` ==========" ; \
sleep 0.2; \
make all; \
done
REPO=git@github.com:c-cube/iter
DOCDIR=.gh-pages
$(DOCDIR)/.git:
mkdir -p $(DOCDIR)
cd $(DOCDIR) && (\
git clone -b gh-pages $(REPO).git . \
)
gh-pages: $(DOCDIR)/.git doc
git -C $(DOCDIR) pull
cp -r _build/default/_doc/_html/* $(DOCDIR)/doc/dev/
git -C $(DOCDIR) add --all
git -C $(DOCDIR) commit -a -m "gh-page updates"
git -C $(DOCDIR) push origin gh-pages
.PHONY: benchs tests examples update_next_tag push_doc push_stable watch gh-pages