make.bat 6.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244
  1. @ECHO OFF
  2. REM Command file for Sphinx documentation
  3. if "%SPHINXBUILD%" == "" (
  4. set SPHINXBUILD=sphinx-build
  5. )
  6. set BUILDDIR=target
  7. set ALLSPHINXOPTS=-d %BUILDDIR%/doctrees %SPHINXOPTS% .
  8. set I18NSPHINXOPTS=%SPHINXOPTS% .
  9. if NOT "%PAPER%" == "" (
  10. set ALLSPHINXOPTS=-D latex_paper_size=%PAPER% %ALLSPHINXOPTS%
  11. set I18NSPHINXOPTS=-D latex_paper_size=%PAPER% %I18NSPHINXOPTS%
  12. )
  13. if "%1" == "" goto help
  14. if "%1" == "help" (
  15. :help
  16. echo.Please use `make ^<target^>` where ^<target^> is one of
  17. echo. html to make standalone HTML files
  18. echo. dirhtml to make HTML files named index.html in directories
  19. echo. singlehtml to make a single large HTML file
  20. echo. pickle to make pickle files
  21. echo. json to make JSON files
  22. echo. htmlhelp to make HTML files and a HTML help project
  23. echo. qthelp to make HTML files and a qthelp project
  24. echo. devhelp to make HTML files and a Devhelp project
  25. echo. epub to make an epub
  26. echo. latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter
  27. echo. latexpdf to make LaTeX files and run them through pdflatex
  28. echo. latexpdfja to make LaTeX files and run them through platex/dvipdfmx
  29. echo. text to make text files
  30. echo. man to make manual pages
  31. echo. texinfo to make Texinfo files
  32. echo. gettext to make PO message catalogs
  33. echo. changes to make an overview over all changed/added/deprecated items
  34. echo. xml to make Docutils-native XML files
  35. echo. pseudoxml to make pseudoxml-XML files for display purposes
  36. echo. linkcheck to check all external links for integrity
  37. echo. doctest to run all doctests embedded in the documentation if enabled
  38. goto end
  39. )
  40. if "%1" == "clean" (
  41. for /d %%i in (%BUILDDIR%\*) do rmdir /q /s %%i
  42. del /q /s %BUILDDIR%\*
  43. goto end
  44. )
  45. %SPHINXBUILD% 2> nul
  46. if errorlevel 9009 (
  47. echo.
  48. echo.The 'sphinx-build' command was not found. Make sure you have Sphinx
  49. echo.installed, then set the SPHINXBUILD environment variable to point
  50. echo.to the full path of the 'sphinx-build' executable. Alternatively you
  51. echo.may add the Sphinx directory to PATH.
  52. echo.
  53. echo.If you don't have Sphinx installed, grab it from
  54. echo.http://sphinx-doc.org/
  55. exit /b 1
  56. )
  57. if "%1" == "html" (
  58. %SPHINXBUILD% -b html %ALLSPHINXOPTS% %BUILDDIR%/html
  59. if errorlevel 1 exit /b 1
  60. echo.
  61. echo.Build finished. The HTML pages are in %BUILDDIR%/html.
  62. goto end
  63. )
  64. if "%1" == "dirhtml" (
  65. %SPHINXBUILD% -b dirhtml %ALLSPHINXOPTS% %BUILDDIR%/dirhtml
  66. if errorlevel 1 exit /b 1
  67. echo.
  68. echo.Build finished. The HTML pages are in %BUILDDIR%/dirhtml.
  69. goto end
  70. )
  71. if "%1" == "singlehtml" (
  72. %SPHINXBUILD% -b singlehtml %ALLSPHINXOPTS% %BUILDDIR%/singlehtml
  73. if errorlevel 1 exit /b 1
  74. echo.
  75. echo.Build finished. The HTML pages are in %BUILDDIR%/singlehtml.
  76. goto end
  77. )
  78. if "%1" == "pickle" (
  79. %SPHINXBUILD% -b pickle %ALLSPHINXOPTS% %BUILDDIR%/pickle
  80. if errorlevel 1 exit /b 1
  81. echo.
  82. echo.Build finished; now you can process the pickle files.
  83. goto end
  84. )
  85. if "%1" == "json" (
  86. %SPHINXBUILD% -b json %ALLSPHINXOPTS% %BUILDDIR%/json
  87. if errorlevel 1 exit /b 1
  88. echo.
  89. echo.Build finished; now you can process the JSON files.
  90. goto end
  91. )
  92. if "%1" == "htmlhelp" (
  93. %SPHINXBUILD% -b htmlhelp %ALLSPHINXOPTS% %BUILDDIR%/htmlhelp
  94. if errorlevel 1 exit /b 1
  95. echo.
  96. echo.Build finished; now you can run HTML Help Workshop with the ^
  97. .hhp project file in %BUILDDIR%/htmlhelp.
  98. goto end
  99. )
  100. if "%1" == "qthelp" (
  101. %SPHINXBUILD% -b qthelp %ALLSPHINXOPTS% %BUILDDIR%/qthelp
  102. if errorlevel 1 exit /b 1
  103. echo.
  104. echo.Build finished; now you can run "qcollectiongenerator" with the ^
  105. .qhcp project file in %BUILDDIR%/qthelp, like this:
  106. echo.^> qcollectiongenerator %BUILDDIR%\qthelp\PbsTestLab.qhcp
  107. echo.To view the help file:
  108. echo.^> assistant -collectionFile %BUILDDIR%\qthelp\PbsTestLab.ghc
  109. goto end
  110. )
  111. if "%1" == "devhelp" (
  112. %SPHINXBUILD% -b devhelp %ALLSPHINXOPTS% %BUILDDIR%/devhelp
  113. if errorlevel 1 exit /b 1
  114. echo.
  115. echo.Build finished.
  116. goto end
  117. )
  118. if "%1" == "epub" (
  119. %SPHINXBUILD% -b epub %ALLSPHINXOPTS% %BUILDDIR%/epub
  120. if errorlevel 1 exit /b 1
  121. echo.
  122. echo.Build finished. The epub file is in %BUILDDIR%/epub.
  123. goto end
  124. )
  125. if "%1" == "latex" (
  126. %SPHINXBUILD% -b latex %ALLSPHINXOPTS% %BUILDDIR%/latex
  127. if errorlevel 1 exit /b 1
  128. echo.
  129. echo.Build finished; the LaTeX files are in %BUILDDIR%/latex.
  130. goto end
  131. )
  132. if "%1" == "latexpdf" (
  133. %SPHINXBUILD% -b latex %ALLSPHINXOPTS% %BUILDDIR%/latex
  134. cd %BUILDDIR%/latex
  135. make all-pdf
  136. cd %BUILDDIR%/..
  137. echo.
  138. echo.Build finished; the PDF files are in %BUILDDIR%/latex.
  139. goto end
  140. )
  141. if "%1" == "latexpdfja" (
  142. %SPHINXBUILD% -b latex %ALLSPHINXOPTS% %BUILDDIR%/latex
  143. cd %BUILDDIR%/latex
  144. make all-pdf-ja
  145. cd %BUILDDIR%/..
  146. echo.
  147. echo.Build finished; the PDF files are in %BUILDDIR%/latex.
  148. goto end
  149. )
  150. if "%1" == "text" (
  151. %SPHINXBUILD% -b text %ALLSPHINXOPTS% %BUILDDIR%/text
  152. if errorlevel 1 exit /b 1
  153. echo.
  154. echo.Build finished. The text files are in %BUILDDIR%/text.
  155. goto end
  156. )
  157. if "%1" == "man" (
  158. %SPHINXBUILD% -b man %ALLSPHINXOPTS% %BUILDDIR%/man
  159. if errorlevel 1 exit /b 1
  160. echo.
  161. echo.Build finished. The manual pages are in %BUILDDIR%/man.
  162. goto end
  163. )
  164. if "%1" == "texinfo" (
  165. %SPHINXBUILD% -b texinfo %ALLSPHINXOPTS% %BUILDDIR%/texinfo
  166. if errorlevel 1 exit /b 1
  167. echo.
  168. echo.Build finished. The Texinfo files are in %BUILDDIR%/texinfo.
  169. goto end
  170. )
  171. if "%1" == "gettext" (
  172. %SPHINXBUILD% -b gettext %I18NSPHINXOPTS% %BUILDDIR%/locale
  173. if errorlevel 1 exit /b 1
  174. echo.
  175. echo.Build finished. The message catalogs are in %BUILDDIR%/locale.
  176. goto end
  177. )
  178. if "%1" == "changes" (
  179. %SPHINXBUILD% -b changes %ALLSPHINXOPTS% %BUILDDIR%/changes
  180. if errorlevel 1 exit /b 1
  181. echo.
  182. echo.The overview file is in %BUILDDIR%/changes.
  183. goto end
  184. )
  185. if "%1" == "linkcheck" (
  186. %SPHINXBUILD% -b linkcheck %ALLSPHINXOPTS% %BUILDDIR%/linkcheck
  187. if errorlevel 1 exit /b 1
  188. echo.
  189. echo.Link check complete; look for any errors in the above output ^
  190. or in %BUILDDIR%/linkcheck/output.txt.
  191. goto end
  192. )
  193. if "%1" == "doctest" (
  194. %SPHINXBUILD% -b doctest %ALLSPHINXOPTS% %BUILDDIR%/doctest
  195. if errorlevel 1 exit /b 1
  196. echo.
  197. echo.Testing of doctests in the sources finished, look at the ^
  198. results in %BUILDDIR%/doctest/output.txt.
  199. goto end
  200. )
  201. if "%1" == "xml" (
  202. %SPHINXBUILD% -b xml %ALLSPHINXOPTS% %BUILDDIR%/xml
  203. if errorlevel 1 exit /b 1
  204. echo.
  205. echo.Build finished. The XML files are in %BUILDDIR%/xml.
  206. goto end
  207. )
  208. if "%1" == "pseudoxml" (
  209. %SPHINXBUILD% -b pseudoxml %ALLSPHINXOPTS% %BUILDDIR%/pseudoxml
  210. if errorlevel 1 exit /b 1
  211. echo.
  212. echo.Build finished. The pseudo-XML files are in %BUILDDIR%/pseudoxml.
  213. goto end
  214. )
  215. :end