File: dune

package info (click to toggle)
rocq-stdlib 9.0.0-3
  • links: PTS, VCS
  • area: main
  • in suites: experimental
  • size: 11,828 kB
  • sloc: python: 2,928; sh: 444; makefile: 319; javascript: 24; ml: 2
file content (49 lines) | stat: -rw-r--r-- 1,860 bytes parent folder | download
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
; This is an ad-hoc rule to ease the migration, it should be handled
; natively by Dune in the future.
(rule
 (targets index-list.html)
 (deps
   make-library-index index-list.html.template hidden-files depends.svg
   (source_tree %{project_root}/theories))
 (action
  (chdir %{project_root}
   ; On windows run will fail
   (bash "doc/stdlib/make-library-index doc/stdlib/index-list.html doc/stdlib/hidden-files"))))

(rule
 (targets depends.svg)
 (deps depends.dot)
 (action (bash "dot -T svg depends.dot | sed -e 's/width=\".*\"/width=\"100%\"/' > depends.svg")))

(rule
  (targets (dir html))
  (alias stdlib-html)
  (package rocq-stdlib-doc)
  (deps
   ; This will be replaced soon by `theories/**/*.v` soon, thanks to rgrinberg
   (source_tree %{project_root}/theories)
   (source_tree %{project_root}/user-contrib)
   (:header %{project_root}/doc/common/styles/html/coqremote/header.html)
   (:footer %{project_root}/doc/common/styles/html/coqremote/footer.html)
   ; For .glob files, should be gone when Coq Dune is smarter.
   (package rocq-stdlib))
 (action
  (progn
   (run mkdir -p html)
   (bash "%{bin:coqdoc} -q -d html --with-header %{header} --with-footer %{footer} --multi-index --html -g -Q %{project_root}/theories Stdlib $(find %{project_root}/theories -name *.v)")
   (run mv html/index.html html/genindex.html)
   (with-stdout-to
     _index.html
    (progn (cat %{header}) (cat index-list.html) (cat %{footer})))
   (run cp depends.svg html/depends.svg)
   (run cp _index.html html/index.html))))

; 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
 (dirs (html as html/stdlib))
 (section doc)
 (package rocq-stdlib-doc))