make.bat 4.4 KB

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