make.bat 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180
  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. 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. 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 djangohtml %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\django.qhcp
  89. echo.To view the help file:
  90. echo.^> assistant -collectionFile %BUILDDIR%\qthelp\django.qhc
  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" == "gettext" (
  129. %SPHINXBUILD% -b gettext %I18NSPHINXOPTS% %BUILDDIR%/locale
  130. if errorlevel 1 exit /b 1
  131. echo.
  132. echo.Build finished. The message catalogs are in %BUILDDIR%/locale.
  133. goto end
  134. )
  135. if "%1" == "changes" (
  136. %SPHINXBUILD% -b changes %ALLSPHINXOPTS% %BUILDDIR%/changes
  137. if errorlevel 1 exit /b 1
  138. echo.
  139. echo.The overview file is in %BUILDDIR%/changes.
  140. goto end
  141. )
  142. if "%1" == "linkcheck" (
  143. %SPHINXBUILD% -b linkcheck %ALLSPHINXOPTS% %BUILDDIR%/linkcheck
  144. if errorlevel 1 exit /b 1
  145. echo.
  146. echo.Link check complete; look for any errors in the above output ^
  147. or in %BUILDDIR%/linkcheck/output.txt.
  148. goto end
  149. )
  150. if "%1" == "doctest" (
  151. %SPHINXBUILD% -b doctest %ALLSPHINXOPTS% %BUILDDIR%/doctest
  152. if errorlevel 1 exit /b 1
  153. echo.
  154. echo.Testing of doctests in the sources finished, look at the ^
  155. results in %BUILDDIR%/doctest/output.txt.
  156. goto end
  157. )
  158. :end