summaryrefslogtreecommitdiff
path: root/hadrian/src/Settings/Builders/Sphinx.hs
diff options
context:
space:
mode:
Diffstat (limited to 'hadrian/src/Settings/Builders/Sphinx.hs')
-rw-r--r--hadrian/src/Settings/Builders/Sphinx.hs22
1 files changed, 22 insertions, 0 deletions
diff --git a/hadrian/src/Settings/Builders/Sphinx.hs b/hadrian/src/Settings/Builders/Sphinx.hs
new file mode 100644
index 0000000000..2338cfcdc6
--- /dev/null
+++ b/hadrian/src/Settings/Builders/Sphinx.hs
@@ -0,0 +1,22 @@
+module Settings.Builders.Sphinx (sphinxBuilderArgs) where
+
+import Settings.Builders.Common
+
+sphinxBuilderArgs :: Args
+sphinxBuilderArgs = do
+ outPath <- getOutput
+ mconcat [ builder (Sphinx Html) ? mconcat
+ [ arg "-b", arg "html"
+ , arg "-d", arg $ outPath -/- ".doctrees-html"
+ , arg =<< getInput
+ , arg outPath ]
+ , builder (Sphinx Latex) ? mconcat
+ [ arg "-b", arg "latex"
+ , arg "-d", arg $ outPath -/- ".doctrees-latex"
+ , arg =<< getInput
+ , arg outPath ]
+ , builder (Sphinx Man) ? mconcat
+ [ arg "-b", arg "man"
+ , arg "-d", arg $ outPath -/- ".doctrees-man"
+ , arg =<< getInput
+ , arg outPath ] ]