make.bat 6.5 KB

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