make.bat 5.0 KB

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