diff options
| author | Théo Zimmermann | 2019-02-28 10:23:29 +0100 |
|---|---|---|
| committer | Théo Zimmermann | 2019-02-28 10:23:29 +0100 |
| commit | 5c4b38ad8763bde984a01dd280af67c1980e0ea6 (patch) | |
| tree | 2be1ebab2773c74b9340c5f89a908e5cfbd73526 /doc/stdlib | |
| parent | ff2c1bea58fcb53c09ba58c4fd3f4d96e750fcbd (diff) | |
| parent | 07ce2588740f689fe92a8d00dd1aeccda5255130 (diff) | |
Merge PR #9649: [dune] Simple rule to generate Stdlib's documentation.
Reviewed-by: SkySkimmer
Reviewed-by: Zimmi48
Ack-by: rgrinberg
Diffstat (limited to 'doc/stdlib')
| -rw-r--r-- | doc/stdlib/dune | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/doc/stdlib/dune b/doc/stdlib/dune new file mode 100644 index 0000000000..7fe2493fbf --- /dev/null +++ b/doc/stdlib/dune @@ -0,0 +1,36 @@ +; 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 + (source_tree %{project_root}/theories) + (source_tree %{project_root}/plugins)) + (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 html) + (deps + ; This will be replaced soon by `theories/**/*.v` soon, thanks to rgrinberg + (source_tree %{project_root}/theories) + (source_tree %{project_root}/plugins) + (: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 coq)) + (action + (progn + (run mkdir -p html) + (bash "%{bin:coqdoc} -q -d html --with-header %{header} --with-footer %{footer} --multi-index --html -g -R %{project_root}/theories Coq -R %{project_root}/plugins Coq $(find %{project_root}/theories %{project_root}/plugins -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 _index.html html/index.html)))) + +(alias + (name stdlib-html) + (deps html)) |
