-
Notifications
You must be signed in to change notification settings - Fork 52
/
Copy pathMakefile
69 lines (53 loc) · 1.49 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 coq test tests examples tutorial hoare_example secure_example install uninstall depgraph for-dune
COQPATHFILE=$(wildcard _CoqPath)
build: coq
include common.mk
all:
# Build the library before tests
$(MAKE) coq
$(MAKE) test
$(MAKE) hoare_example
$(MAKE) secure_example
install: Makefile.coq coq
$(MAKE) -f $< $@
uninstall: Makefile.coq
$(MAKE) -f $< $@
test: examples tests
tests:
$(MAKE) -C tests
$(MAKE) -C tutorial test
examples:
$(MAKE) -C examples
tutorial:
$(MAKE) -C tutorial
hoare_example:
$(MAKE) -C hoare_example
secure_example:
$(MAKE) -C secure_example
clean: clean-coq
$(RM) _CoqProject
$(MAKE) -C tests clean
$(MAKE) -C examples clean
$(MAKE) -C tutorial clean
$(MAKE) -C hoare_example clean
$(MAKE) -C secure_example clean
_CoqProject: $(COQPATHFILE) _CoqProject.itree _CoqProject.extra Makefile
@ echo "# Generating _CoqProject"
@ rm -f _CoqProject
@ echo "# THIS IS AN AUTOMATICALLY GENERATED FILE" >> _CoqProject
@ echo "# PLEASE EDIT _CoqConfig INSTEAD" >> _CoqProject
@ echo >> _CoqProject
ifneq ("$(COQPATHFILE)","")
@ echo "# including: _CoqPath"
@ cat _CoqPath >> _CoqProject
@ echo >> _CoqProject
endif
@ echo "# including: _CoqConfig"
@ cat _CoqProject.itree _CoqProject.extra >> _CoqProject
COQDEP=coqdep
DEPS_DOT=deps.dot
DEPS_OUT=deps.jpg
depgraph:
$(COQDEP) -dumpgraph $(DEPS_DOT) $(shell cat _CoqConfig) > /dev/null 2>&1
sed 's%\("theories/\([^"]*\)/\([^"/]*\)"\[label="\)%\1\2/\\n%' -i $(DEPS_DOT)
dot $(DEPS_DOT) -Tjpg -o$(DEPS_OUT)