make.bat 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199
  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. set I18NSPHINXOPTS=%SPHINXOPTS% .
  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. pdf to make a PDF file with rst2pdf
  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. linkcheck to check all external links for integrity
  34. echo. doctest to run all doctests embedded in the documentation if enabled
  35. goto end
  36. )
  37. if "%1" == "clean" (
  38. for /d %%i in (%BUILDDIR%\*) do rmdir /q /s %%i
  39. del /q /s %BUILDDIR%\*
  40. goto end
  41. )
  42. if "%1" == "html" (
  43. %SPHINXBUILD% -b html %ALLSPHINXOPTS% %BUILDDIR%/html
  44. if errorlevel 1 exit /b 1
  45. echo.
  46. echo.Build finished. The HTML pages are in %BUILDDIR%/html.
  47. goto end
  48. )
  49. if "%1" == "dirhtml" (
  50. %SPHINXBUILD% -b dirhtml %ALLSPHINXOPTS% %BUILDDIR%/dirhtml
  51. if errorlevel 1 exit /b 1
  52. echo.
  53. echo.Build finished. The HTML pages are in %BUILDDIR%/dirhtml.
  54. goto end
  55. )
  56. if "%1" == "singlehtml" (
  57. %SPHINXBUILD% -b singlehtml %ALLSPHINXOPTS% %BUILDDIR%/singlehtml
  58. if errorlevel 1 exit /b 1
  59. echo.
  60. echo.Build finished. The HTML pages are in %BUILDDIR%/singlehtml.
  61. goto end
  62. )
  63. if "%1" == "pdf" (
  64. %SPHINXBUILD% -b pdf %ALLSPHINXOPTS% %BUILDDIR%/pdf
  65. if errorlevel 1 exit /b 1
  66. echo.
  67. echo.Build finished. The PDF file is in %BUILDDIR%/pdf.
  68. goto end
  69. )
  70. if "%1" == "pickle" (
  71. %SPHINXBUILD% -b pickle %ALLSPHINXOPTS% %BUILDDIR%/pickle
  72. if errorlevel 1 exit /b 1
  73. echo.
  74. echo.Build finished; now you can process the pickle files.
  75. goto end
  76. )
  77. if "%1" == "json" (
  78. %SPHINXBUILD% -b json %ALLSPHINXOPTS% %BUILDDIR%/json
  79. if errorlevel 1 exit /b 1
  80. echo.
  81. echo.Build finished; now you can process the JSON files.
  82. goto end
  83. )
  84. if "%1" == "htmlhelp" (
  85. %SPHINXBUILD% -b htmlhelp %ALLSPHINXOPTS% %BUILDDIR%/htmlhelp
  86. if errorlevel 1 exit /b 1
  87. echo.
  88. echo.Build finished; now you can run HTML Help Workshop with the ^
  89. .hhp project file in %BUILDDIR%/htmlhelp.
  90. goto end
  91. )
  92. if "%1" == "qthelp" (
  93. %SPHINXBUILD% -b qthelp %ALLSPHINXOPTS% %BUILDDIR%/qthelp
  94. if errorlevel 1 exit /b 1
  95. echo.
  96. echo.Build finished; now you can run "qcollectiongenerator" with the ^
  97. .qhcp project file in %BUILDDIR%/qthelp, like this:
  98. echo.^> qcollectiongenerator %BUILDDIR%\qthelp\OwncloudDocumentation.qhcp
  99. echo.To view the help file:
  100. echo.^> assistant -collectionFile %BUILDDIR%\qthelp\OwncloudDocumentation.ghc
  101. goto end
  102. )
  103. if "%1" == "devhelp" (
  104. %SPHINXBUILD% -b devhelp %ALLSPHINXOPTS% %BUILDDIR%/devhelp
  105. if errorlevel 1 exit /b 1
  106. echo.
  107. echo.Build finished.
  108. goto end
  109. )
  110. if "%1" == "epub" (
  111. %SPHINXBUILD% -b epub %ALLSPHINXOPTS% %BUILDDIR%/epub
  112. if errorlevel 1 exit /b 1
  113. echo.
  114. echo.Build finished. The epub file is in %BUILDDIR%/epub.
  115. goto end
  116. )
  117. if "%1" == "latex" (
  118. %SPHINXBUILD% -b latex %ALLSPHINXOPTS% %BUILDDIR%/latex
  119. if errorlevel 1 exit /b 1
  120. echo.
  121. echo.Build finished; the LaTeX files are in %BUILDDIR%/latex.
  122. goto end
  123. )
  124. if "%1" == "text" (
  125. %SPHINXBUILD% -b text %ALLSPHINXOPTS% %BUILDDIR%/text
  126. if errorlevel 1 exit /b 1
  127. echo.
  128. echo.Build finished. The text files are in %BUILDDIR%/text.
  129. goto end
  130. )
  131. if "%1" == "man" (
  132. %SPHINXBUILD% -b man %ALLSPHINXOPTS% %BUILDDIR%/man
  133. if errorlevel 1 exit /b 1
  134. echo.
  135. echo.Build finished. The manual pages are in %BUILDDIR%/man.
  136. goto end
  137. )
  138. if "%1" == "texinfo" (
  139. %SPHINXBUILD% -b texinfo %ALLSPHINXOPTS% %BUILDDIR%/texinfo
  140. if errorlevel 1 exit /b 1
  141. echo.
  142. echo.Build finished. The Texinfo files are in %BUILDDIR%/texinfo.
  143. goto end
  144. )
  145. if "%1" == "gettext" (
  146. %SPHINXBUILD% -b gettext %I18NSPHINXOPTS% %BUILDDIR%/locale
  147. if errorlevel 1 exit /b 1
  148. echo.
  149. echo.Build finished. The message catalogs are in %BUILDDIR%/locale.
  150. goto end
  151. )
  152. if "%1" == "changes" (
  153. %SPHINXBUILD% -b changes %ALLSPHINXOPTS% %BUILDDIR%/changes
  154. if errorlevel 1 exit /b 1
  155. echo.
  156. echo.The overview file is in %BUILDDIR%/changes.
  157. goto end
  158. )
  159. if "%1" == "linkcheck" (
  160. %SPHINXBUILD% -b linkcheck %ALLSPHINXOPTS% %BUILDDIR%/linkcheck
  161. if errorlevel 1 exit /b 1
  162. echo.
  163. echo.Link check complete; look for any errors in the above output ^
  164. or in %BUILDDIR%/linkcheck/output.txt.
  165. goto end
  166. )
  167. if "%1" == "doctest" (
  168. %SPHINXBUILD% -b doctest %ALLSPHINXOPTS% %BUILDDIR%/doctest
  169. if errorlevel 1 exit /b 1
  170. echo.
  171. echo.Testing of doctests in the sources finished, look at the ^
  172. results in %BUILDDIR%/doctest/output.txt.
  173. goto end
  174. )
  175. :end