-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdune
73 lines (67 loc) · 2.11 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
65
66
67
68
69
70
71
72
73
(rule
(targets unreleased.rst)
; We need to keep this as the sphinx build still requires this file
; in-tree, to be fixed hopefully soon
(mode promote-until-clean)
(deps (source_tree changelog))
(action (with-stdout-to %{targets} (bash "cat changelog/00-title.rst changelog/*/*.rst"))))
(alias
(name refman-deps)
(deps
; We could use finer dependencies here so the build is faster:
;
; - vo files: generated by sphinx after parsing the doc, promoted,
; - Static files:
; + %{bin:coqdoc} etc...
; + config/coq_config.py
; + tools/coqdoc/coqdoc.css
(package coq-core)
(package coq-stdlib)
(source_tree sphinx)
(source_tree tools/coqrst)
unreleased.rst
(env_var SPHINXWARNOPT)))
(rule
(targets refman-html)
(alias refman-html)
(package coq-doc)
; Cannot use this deps alias because of ocaml/dune#3415
; (deps (alias refman-deps))
; EJGA: note this should've been fixed in dune master as of 05/03/2021
(deps
(package coq-core)
(package coq-stdlib)
(source_tree sphinx)
(source_tree tools/coqrst)
unreleased.rst
(env_var SPHINXWARNOPT))
(action
(run env COQLIB=%{project_root} sphinx-build -q %{env:SPHINXWARNOPT=-W} -b html sphinx %{targets})))
(rule
(targets refman-pdf)
(alias refman-pdf)
(package coq-doc)
; Cannot use this deps alias because of ocaml/dune#3415
; (deps (alias refman-deps))
; EJGA: note this should've been fixed in dune master as of 05/03/2021
(deps
(package coq-core)
(package coq-stdlib)
(source_tree sphinx)
(source_tree tools/coqrst)
unreleased.rst
(env_var SPHINXWARNOPT))
(action
(progn
(run env COQLIB=%{project_root} sphinx-build -q %{env:SPHINXWARNOPT=-W} -b latex sphinx %{targets})
(chdir %{targets} (run make LATEXMKOPTS=-silent)))))
; Installable directories are not yet fully supported by Dune. See
; ocaml/dune#1868. Yet, this makes coq-doc.install a valid target to
; generate the whole Coq documentation. And the result under
; _build/install/default/doc/coq-doc looks just right!
(install
(files (refman-html as html/refman) (refman-pdf as pdf/refman))
(section doc)
(package coq-doc))
(documentation
(package coq-doc))