aboutsummaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorThéo Zimmermann2018-12-14 12:53:29 +0100
committerThéo Zimmermann2018-12-14 12:53:29 +0100
commit40aac459c94b9a8696e4d23dfdc0ce9279e63616 (patch)
treec6fd34efea1f0ca2638bc9aa68809a2d3640ed46 /doc
parent7e3603069cf591c6c70ef25d4cfc72f62aa44058 (diff)
parentca4e25215144503f1dd42903421a61baee22b73e (diff)
Merge PR #9147: [dune] [doc] Support for building the reference manual with Dune.
Diffstat (limited to 'doc')
-rw-r--r--doc/dune24
-rw-r--r--doc/sphinx/dune1
-rw-r--r--doc/tools/coqrst/coqdoc/main.py2
3 files changed, 26 insertions, 1 deletions
diff --git a/doc/dune b/doc/dune
new file mode 100644
index 0000000000..54ffa87205
--- /dev/null
+++ b/doc/dune
@@ -0,0 +1,24 @@
+(rule
+ (targets sphinx_build)
+ (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))
+ (action (run sphinx-build -j4 -b html -d sphinx_build/doctrees sphinx sphinx_build/html)))
+
+(alias
+ (name refman-html)
+ (deps sphinx_build))
+
+; The install target still needs more work.
+; (install
+; (section doc)
+; (package coq-refman)
+; (files sphinx_build))
diff --git a/doc/sphinx/dune b/doc/sphinx/dune
new file mode 100644
index 0000000000..fff025c919
--- /dev/null
+++ b/doc/sphinx/dune
@@ -0,0 +1 @@
+(dirs :standard _static)
diff --git a/doc/tools/coqrst/coqdoc/main.py b/doc/tools/coqrst/coqdoc/main.py
index 57adcb287c..1de9890992 100644
--- a/doc/tools/coqrst/coqdoc/main.py
+++ b/doc/tools/coqrst/coqdoc/main.py
@@ -35,7 +35,7 @@ COQDOC_HEADER = "".join("(** remove printing {} *)".format(s) for s in COQDOC_SY
def coqdoc(coq_code, coqdoc_bin=None):
"""Get the output of coqdoc on coq_code."""
- coqdoc_bin = coqdoc_bin or os.path.join(os.getenv("COQBIN"), "coqdoc")
+ coqdoc_bin = coqdoc_bin or os.path.join(os.getenv("COQBIN", ""), "coqdoc")
fd, filename = mkstemp(prefix="coqdoc-", suffix=".v")
if platform.system().startswith("CYGWIN"):
# coqdoc currently doesn't accept cygwin style paths in the form "/cygdrive/c/..."