make.bat 5.3 KB

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