forked from coq/coq
-
Notifications
You must be signed in to change notification settings - Fork 1
/
dune
48 lines (43 loc) · 1.34 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
(rule
(targets unreleased.rst)
(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)
(source_tree sphinx)
(source_tree tools/coqrst)
unreleased.rst
(env_var SPHINXWARNOPT)))
(rule
(targets refman-html)
(alias refman-html)
(package coq-doc)
(deps (alias refman-deps))
(action
(run env COQLIB=%{project_root} sphinx-build %{env:SPHINXWARNOPT=-W} -b html sphinx %{targets})))
(rule
(targets refman-pdf)
(alias refman-pdf)
(package coq-doc)
(deps (alias refman-deps))
(action
(progn
(run env COQLIB=%{project_root} sphinx-build %{env:SPHINXWARNOPT=-W} -b latex sphinx %{targets})
(chdir %{targets} (run make)))))
; 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))