-
Notifications
You must be signed in to change notification settings - Fork 3
/
Makefile
71 lines (54 loc) · 2.06 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
60
61
62
63
64
65
66
67
68
69
70
71
# Makefile
DUNE_OPTS?= --profile=release
IMANDRA_SWITCH?=/usr/local/var/imandra
imandra-libs-install:
cd vendor/imandra-ptime && opam install . --switch $(IMANDRA_SWITCH) -y && cd -
imandra-libs-uninstall:
opam uninstall imandra-ptime --switch $(IMANDRA_SWITCH)
imandra-libs-unpin:
opam unpin imandra-ptime --switch $(IMANDRA_SWITCH)
build:
opam exec -- dune build $(DUNE_OPTS) @install
build_tests:
opam exec -- dune build $(DUNE_OPTS) tests/test_runner.bc
opam exec -- dune build $(DUNE_OPTS) tests/test_server.exe
opam exec -- dune build $(DUNE_OPTS) tests/parser_test_runner.exe
run_parser_tests:
opam exec -- dune exec tests/parser_test_runner.exe
doc:
opam exec -- dune build $(DUNE_OPTS) @doc
mkdir -p _pages/doc
cp -r _build/default/_doc/_html/* _pages/doc/
rm -rf _pages/doc/odoc.css
sed -i '' -e 's/<body>/<body><nav><\/nav>/g' _pages/doc/index.html
rm dune
module_graph.svg: _build/doc/all_modules.docdir/all_modules.dot
sed -e 's/rotate=90;//g' "$<" | dot -Tsvg -o $@
# Note: keep this opam install command in sync with the Dockerfile
# opam1-setup - for running in Wercker. Assumes the correct switch is already installed and selected.
opam1-setup:
opam install \
./vendor/imandra-ptime/imandra-ptime.opam \
./vendor/imandra-prelude/imandra-prelude.opam \
./fix-engine.opam \
--deps-only -y
# opam2-setup - Will create a local switch under ./_opam.
opam2-setup: _opam opam1-setup
_opam:
opam switch create . --empty
opam switch set-invariant ocaml-base-compiler.4.12.1
format:
@echo "(dirs :standard \ *-vg)" > dune
opam exec -- dune build $(DUNE_OPTS) @fmt --auto-promote || true
rm dune
format_vgs:
@echo "(dirs :standard \ src-protocol-exts src-protocol-exts-pp src-model src-simulation src-simulation-utils src-core-utils src-tests-utils)" > dune
opam exec -- dune build $(DUNE_OPTS) @fmt --auto-promote || true
rm dune
clean:
opam exec -- dune clean $(DUNE_OPTS)
bench-engine-decode:
opam exec -- dune exec $(DUNE_OPTS) tests/benchs/engine/bench_engine_decode.exe --
WATCH?=@check
watch:
@opam exec -- dune build $(DUNE_OPTS) $(WATCH) -w