-
Notifications
You must be signed in to change notification settings - Fork 29
/
Makefile
59 lines (45 loc) · 1.52 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
DUNE_DOCDIR=$(CURDIR)/_build/default/_doc/_html
LOCAL_ALLDOCDIR=$(CURDIR)/doc
LOCAL_BINDIR=$(CURDIR)/bin
LOCAL_DOCDIR=$(CURDIR)/ocamldoc
LOCAL_USRDOCDIR=$(CURDIR)/doc/usr
.PHONY: all build clean doc install kind2-doc test uninstall
all: build
build:
@dune build src @install
@dune install --sections=bin --prefix . 2> /dev/null
static:
@LINKING_MODE=static dune build src @install
@dune install --sections=bin --prefix . 2> /dev/null
clean:
@dune clean
@rm -rf $(LOCAL_BINDIR) $(LOCAL_DOCDIR)
doc:
make -C $(LOCAL_USRDOCDIR) all
cp $(LOCAL_USRDOCDIR)/build/pdf/kind2.pdf $(LOCAL_ALLDOCDIR)/user_documentation.pdf
install:
@opam pin add -n -y kind2 https://github.com/kind2-mc/kind2.git
@opam depext -y kind2
@opam install -y kind2
kind2-doc:
@dune build @doc-private
@dune build @copy
@mkdir -p $(LOCAL_DOCDIR)
@cp -rf $(DUNE_DOCDIR)/* $(LOCAL_DOCDIR)
test: build
@dune build @runtest
@$(CURDIR)/tests/run.sh $(CURDIR)/tests/regression $(CURDIR)/bin/kind2 --timeout 42
uninstall:
@opam remove -y kind2
@opam unpin kind2
.PHONY: lustre-update lustre-complete
# How to use the following commands is documented in
# ./src/lustre/Makefile.messages.maintenance
# Quick tip: run `make lustre-complete` after changing
# Lustre grammar to repair lustreParser.messages
lustre-update:
@ make -f Makefile.messages.maintenance -C $(CURDIR)/src/lustre/ update
lustre-strip:
@ make -f Makefile.messages.maintenance -C $(CURDIR)/src/lustre/ strip
lustre-complete:
@ make -f Makefile.messages.maintenance -C $(CURDIR)/src/lustre/ complete