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