forked from HoTT/Coq-HoTT
-
Notifications
You must be signed in to change notification settings - Fork 0
/
dune
64 lines (57 loc) · 1.1 KB
/
dune
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
; Rule for generating coq_project
; This uses (mode promote) in order to put _CoqProject in the source tree.
; This isn't actually needed for dune but is useful when working with editors.
(rule
(target _CoqProject)
(deps
./etc/generate_coqproject.sh
(source_tree theories)
(source_tree contrib)
(source_tree test))
(mode promote)
(package coq-hott)
(action
(setenv
GENERATE_COQPROJECT_FOR_DUNE
true
(bash ./etc/generate_coqproject.sh))))
; Rule for validation: dune build @runtest
; This will also run the tests
(rule
(alias runtest)
(deps
(glob_files_rec ./*.vo))
(action
(run
coqchk
-R
./theories
HoTT
-Q
contrib
HoTT.Contrib
-Q
test
HoTT.Tests
%{deps}
-o)))
; We modify the default alias to avoid test/
(alias
(name default)
(deps
(alias_rec contrib/all)
(alias_rec theories/all)
_CoqProject))
; Tags for emacs
(rule
(target TAGS)
(alias emacs)
(mode promote)
(deps
etc/emacs/run-etags.sh
%{bin:etags}
(:vfile
(glob_files_rec theories/*.v)
(glob_files_rec contrib/*.v)))
(action
(run etc/emacs/run-etags.sh %{vfile})))