make.bat 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188
  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% source
  8. if NOT "%PAPER%" == "" (
  9. set ALLSPHINXOPTS=-D latex_paper_size=%PAPER% %ALLSPHINXOPTS%
  10. )
  11. if "%1" == "" goto help
  12. if "%1" == "help" (
  13. :help
  14. echo.Please use `make ^<target^>` where ^<target^> is one of
  15. echo. html to make standalone HTML files
  16. echo. dirhtml to make HTML files named index.html in directories
  17. echo. singlehtml to make a single large HTML file
  18. echo. pickle to make pickle files
  19. echo. json to make JSON files
  20. echo. htmlhelp to make HTML files and a HTML help project
  21. echo. qthelp to make HTML files and a qthelp project
  22. echo. devhelp to make HTML files and a Devhelp project
  23. echo. epub to make an epub
  24. echo. latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter
  25. echo. text to make text files
  26. echo. man to make manual pages
  27. echo. texinfo to make Texinfo files
  28. echo. gettext to make PO message catalogs
  29. echo. changes to make an overview over all changed/added/deprecated items
  30. echo. linkcheck to check all external links for integrity
  31. echo. doctest to run all doctests embedded in the documentation if enabled
  32. goto end
  33. )
  34. if "%1" == "clean" (
  35. for /d %%i in (%BUILDDIR%\*) do rmdir /q /s %%i
  36. del /q /s %BUILDDIR%\*
  37. goto end
  38. )
  39. if "%1" == "html" (
  40. %SPHINXBUILD% -b html %ALLSPHINXOPTS% %BUILDDIR%/html
  41. if errorlevel 1 exit /b 1
  42. echo.
  43. echo.Build finished. The HTML pages are in %BUILDDIR%/html.
  44. goto end
  45. )
  46. if "%1" == "dirhtml" (
  47. %SPHINXBUILD% -b dirhtml %ALLSPHINXOPTS% %BUILDDIR%/dirhtml
  48. if errorlevel 1 exit /b 1
  49. echo.
  50. echo.Build finished. The HTML pages are in %BUILDDIR%/dirhtml.
  51. goto end
  52. )
  53. if "%1" == "singlehtml" (
  54. %SPHINXBUILD% -b singlehtml %ALLSPHINXOPTS% %BUILDDIR%/singlehtml
  55. if errorlevel 1 exit /b 1
  56. echo.
  57. echo.Build finished. The HTML pages are in %BUILDDIR%/singlehtml.
  58. goto end
  59. )
  60. if "%1" == "pickle" (
  61. %SPHINXBUILD% -b pickle %ALLSPHINXOPTS% %BUILDDIR%/pickle
  62. if errorlevel 1 exit /b 1
  63. echo.
  64. echo.Build finished; now you can process the pickle files.
  65. goto end
  66. )
  67. if "%1" == "json" (
  68. %SPHINXBUILD% -b json %ALLSPHINXOPTS% %BUILDDIR%/json
  69. if errorlevel 1 exit /b 1
  70. echo.
  71. echo.Build finished; now you can process the JSON files.
  72. goto end
  73. )
  74. if "%1" == "htmlhelp" (
  75. %SPHINXBUILD% -b htmlhelp %ALLSPHINXOPTS% %BUILDDIR%/htmlhelp
  76. if errorlevel 1 exit /b 1
  77. echo.
  78. echo.Build finished; now you can run HTML Help Workshop with the ^
  79. .hhp project file in %BUILDDIR%/htmlhelp.
  80. goto end
  81. )
  82. if "%1" == "qthelp" (
  83. %SPHINXBUILD% -b qthelp %ALLSPHINXOPTS% %BUILDDIR%/qthelp
  84. if errorlevel 1 exit /b 1
  85. echo.
  86. echo.Build finished; now you can run "qcollectiongenerator" with the ^
  87. .qhcp project file in %BUILDDIR%/qthelp, like this:
  88. echo.^> qcollectiongenerator %BUILDDIR%\qthelp\argparse.qhcp
  89. echo.To view the help file:
  90. echo.^> assistant -collectionFile %BUILDDIR%\qthelp\argparse.ghc
  91. goto end
  92. )
  93. if "%1" == "devhelp" (
  94. %SPHINXBUILD% -b devhelp %ALLSPHINXOPTS% %BUILDDIR%/devhelp
  95. if errorlevel 1 exit /b 1
  96. echo.
  97. echo.Build finished.
  98. goto end
  99. )
  100. if "%1" == "epub" (
  101. %SPHINXBUILD% -b epub %ALLSPHINXOPTS% %BUILDDIR%/epub
  102. if errorlevel 1 exit /b 1
  103. echo.
  104. echo.Build finished. The epub file is in %BUILDDIR%/epub.
  105. goto end
  106. )
  107. if "%1" == "latex" (
  108. %SPHINXBUILD% -b latex %ALLSPHINXOPTS% %BUILDDIR%/latex
  109. if errorlevel 1 exit /b 1
  110. echo.
  111. echo.Build finished; the LaTeX files are in %BUILDDIR%/latex.
  112. goto end
  113. )
  114. if "%1" == "text" (
  115. %SPHINXBUILD% -b text %ALLSPHINXOPTS% %BUILDDIR%/text
  116. if errorlevel 1 exit /b 1
  117. echo.
  118. echo.Build finished. The text files are in %BUILDDIR%/text.
  119. goto end
  120. )
  121. if "%1" == "man" (
  122. %SPHINXBUILD% -b man %ALLSPHINXOPTS% %BUILDDIR%/man
  123. if errorlevel 1 exit /b 1
  124. echo.
  125. echo.Build finished. The manual pages are in %BUILDDIR%/man.
  126. goto end
  127. )
  128. if "%1" == "texinfo" (
  129. %SPHINXBUILD% -b texinfo %ALLSPHINXOPTS% %BUILDDIR%/texinfo
  130. if errorlevel 1 exit /b 1
  131. echo.
  132. echo.Build finished. The Texinfo files are in %BUILDDIR%/texinfo.
  133. goto end
  134. )
  135. if "%1" == "gettext" (
  136. %SPHINXBUILD% -b gettext %ALLSPHINXOPTS% %BUILDDIR%/locale
  137. if errorlevel 1 exit /b 1
  138. echo.
  139. echo.Build finished. The message catalogs are in %BUILDDIR%/locale.
  140. goto end
  141. )
  142. if "%1" == "changes" (
  143. %SPHINXBUILD% -b changes %ALLSPHINXOPTS% %BUILDDIR%/changes
  144. if errorlevel 1 exit /b 1
  145. echo.
  146. echo.The overview file is in %BUILDDIR%/changes.
  147. goto end
  148. )
  149. if "%1" == "linkcheck" (
  150. %SPHINXBUILD% -b linkcheck %ALLSPHINXOPTS% %BUILDDIR%/linkcheck
  151. if errorlevel 1 exit /b 1
  152. echo.
  153. echo.Link check complete; look for any errors in the above output ^
  154. or in %BUILDDIR%/linkcheck/output.txt.
  155. goto end
  156. )
  157. if "%1" == "doctest" (
  158. %SPHINXBUILD% -b doctest %ALLSPHINXOPTS% %BUILDDIR%/doctest
  159. if errorlevel 1 exit /b 1
  160. echo.
  161. echo.Testing of doctests in the sources finished, look at the ^
  162. results in %BUILDDIR%/doctest/output.txt.
  163. goto end
  164. )
  165. :end