-
Notifications
You must be signed in to change notification settings - Fork 32
/
Copy pathMakefile
49 lines (39 loc) · 1.07 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
test: test-rust test-ocaml
test-rust:
@cargo run --example rust --features=link
test-ocaml:
@dune clean --root=test
@dune runtest --root=test --force --no-buffer
test-book:
@cargo clean
@cargo build
@mdbook test doc -L ./target/debug/deps
build-book:
@mdbook build doc
utop:
@dune utop --root=test
clean:
cargo clean
dune clean --root=test
mdbook clean doc || :
publish-sys:
cd sys && cargo package && cargo publish && sleep 20
publish:
cd derive && cargo package && cargo publish && sleep 20
cd build && cargo package && cargo publish && sleep 20
cargo package && cargo publish
make deploy-book
deploy-book: build-book
@echo "====> deploying to github"
git worktree remove /tmp/ocaml-rs-book || :
git worktree add /tmp/ocaml-rs-book gh-pages
mdbook build doc
rm -rf /tmp/ocaml-rs-book/*
cp -rp doc/book/* /tmp/ocaml-rs-book/
cd /tmp/ocaml-rs-book && \
git update-ref -d refs/heads/gh-pages && \
git add -A && \
git commit -m "deployed on $(shell date) by ${USER}" && \
git push origin gh-pages -f && \
rm -r /tmp/ocaml-rs-book
.PHONY: test clean