-
Notifications
You must be signed in to change notification settings - Fork 39
/
Makefile
69 lines (51 loc) · 1.65 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
.PHONY: clean all serlib sertop sercomp force js-dist js-release build build-install test doc
# Leave empty to use OPAM-installed Coq
SERAPI_COQ_HOME ?=
# SERAPI_COQ_HOME=/home/egallego/external/coq-master/_build/install/default/lib/
ifneq ($SERAPI_COQ_HOME,)
export OCAMLPATH := $(SERAPI_COQ_HOME):$(OCAMLPATH)
SP_PKGS=coq-serapi
else
SP_PKGS=coq-serapi
endif
all: build
GITDEPS=$(ls .git/HEAD .git/index)
sertop/ser_version.ml: $(GITDEPS)
echo "let ser_git_version = \"$(shell git describe --tags || cat VERSION)\";;" > $@
build: vendor/coq-lsp
dune build --root . --only-packages=$(SP_PKGS) @install
check:
dune build --root . @check
build-install:
dune build coq-serapi.install
# build is required as otherwise the serlib plugins won't be in scope
# for testing; we should really add the package dep to dune test files
test: build
dune runtest --root .
doc:
dune build @doc-private @doc
browser:
google-chrome _build/default/_doc/_html/index.html
sertop: build
dune exec -- rlwrap sertop
vendor/coq-lsp:
$(error Submodules not initialized, please do "make submodules-init")
.PHONY: submodules-init
submodules-init:
git submodule update --init
# Deinitialize submodules
.PHONY: submodules-deinit
submodules-deinit:
git submodule deinit -f --all
# Update submodules from upstream
.PHONY: submodules-update
submodules-update:
(cd vendor/coq-lsp && git checkout main && git pull upstream main)
#####################################################
# Misc
clean:
rm -f sertop/ser_version.ml
dune clean
demo-sync:
rsync -avzp --delete js/ /home/egallego/x80/rhino-hawk/
cp /home/egallego/x80/rhino-hawk/term.html /home/egallego/x80/rhino-hawk/index.html