make.bat 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176
  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. set I18NSPHINXOPTS=%SPHINXOPTS% source
  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. 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" == "devhelp" (
  83. %SPHINXBUILD% -b devhelp %ALLSPHINXOPTS% %BUILDDIR%/devhelp
  84. if errorlevel 1 exit /b 1
  85. echo.
  86. echo.Build finished.
  87. goto end
  88. )
  89. if "%1" == "epub" (
  90. %SPHINXBUILD% -b epub %ALLSPHINXOPTS% %BUILDDIR%/epub
  91. if errorlevel 1 exit /b 1
  92. echo.
  93. echo.Build finished. The epub file is in %BUILDDIR%/epub.
  94. goto end
  95. )
  96. if "%1" == "latex" (
  97. %SPHINXBUILD% -b latex %ALLSPHINXOPTS% %BUILDDIR%/latex
  98. if errorlevel 1 exit /b 1
  99. echo.
  100. echo.Build finished; the LaTeX files are in %BUILDDIR%/latex.
  101. goto end
  102. )
  103. if "%1" == "text" (
  104. %SPHINXBUILD% -b text %ALLSPHINXOPTS% %BUILDDIR%/text
  105. if errorlevel 1 exit /b 1
  106. echo.
  107. echo.Build finished. The text files are in %BUILDDIR%/text.
  108. goto end
  109. )
  110. if "%1" == "man" (
  111. %SPHINXBUILD% -b man %ALLSPHINXOPTS% %BUILDDIR%/man
  112. if errorlevel 1 exit /b 1
  113. echo.
  114. echo.Build finished. The manual pages are in %BUILDDIR%/man.
  115. goto end
  116. )
  117. if "%1" == "texinfo" (
  118. %SPHINXBUILD% -b texinfo %ALLSPHINXOPTS% %BUILDDIR%/texinfo
  119. if errorlevel 1 exit /b 1
  120. echo.
  121. echo.Build finished. The Texinfo files are in %BUILDDIR%/texinfo.
  122. goto end
  123. )
  124. if "%1" == "gettext" (
  125. %SPHINXBUILD% -b gettext %I18NSPHINXOPTS% %BUILDDIR%/locale
  126. if errorlevel 1 exit /b 1
  127. echo.
  128. echo.Build finished. The message catalogs are in %BUILDDIR%/locale.
  129. goto end
  130. )
  131. if "%1" == "changes" (
  132. %SPHINXBUILD% -b changes %ALLSPHINXOPTS% %BUILDDIR%/changes
  133. if errorlevel 1 exit /b 1
  134. echo.
  135. echo.The overview file is in %BUILDDIR%/changes.
  136. goto end
  137. )
  138. if "%1" == "linkcheck" (
  139. %SPHINXBUILD% -b linkcheck %ALLSPHINXOPTS% %BUILDDIR%/linkcheck
  140. if errorlevel 1 exit /b 1
  141. echo.
  142. echo.Link check complete; look for any errors in the above output ^
  143. or in %BUILDDIR%/linkcheck/output.txt.
  144. goto end
  145. )
  146. if "%1" == "doctest" (
  147. %SPHINXBUILD% -b doctest %ALLSPHINXOPTS% %BUILDDIR%/doctest
  148. if errorlevel 1 exit /b 1
  149. echo.
  150. echo.Testing of doctests in the sources finished, look at the ^
  151. results in %BUILDDIR%/doctest/output.txt.
  152. goto end
  153. )
  154. :end