make.bat 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155
  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. echo.
  40. echo.Build finished. The HTML pages are in %BUILDDIR%/html.
  41. goto end
  42. )
  43. if "%1" == "dirhtml" (
  44. %SPHINXBUILD% -b dirhtml %ALLSPHINXOPTS% %BUILDDIR%/dirhtml
  45. echo.
  46. echo.Build finished. The HTML pages are in %BUILDDIR%/dirhtml.
  47. goto end
  48. )
  49. if "%1" == "singlehtml" (
  50. %SPHINXBUILD% -b singlehtml %ALLSPHINXOPTS% %BUILDDIR%/singlehtml
  51. echo.
  52. echo.Build finished. The HTML pages are in %BUILDDIR%/singlehtml.
  53. goto end
  54. )
  55. if "%1" == "pickle" (
  56. %SPHINXBUILD% -b pickle %ALLSPHINXOPTS% %BUILDDIR%/pickle
  57. echo.
  58. echo.Build finished; now you can process the pickle files.
  59. goto end
  60. )
  61. if "%1" == "json" (
  62. %SPHINXBUILD% -b json %ALLSPHINXOPTS% %BUILDDIR%/json
  63. echo.
  64. echo.Build finished; now you can process the JSON files.
  65. goto end
  66. )
  67. if "%1" == "htmlhelp" (
  68. %SPHINXBUILD% -b htmlhelp %ALLSPHINXOPTS% %BUILDDIR%/htmlhelp
  69. echo.
  70. echo.Build finished; now you can run HTML Help Workshop with the ^
  71. .hhp project file in %BUILDDIR%/htmlhelp.
  72. goto end
  73. )
  74. if "%1" == "qthelp" (
  75. %SPHINXBUILD% -b qthelp %ALLSPHINXOPTS% %BUILDDIR%/qthelp
  76. echo.
  77. echo.Build finished; now you can run "qcollectiongenerator" with the ^
  78. .qhcp project file in %BUILDDIR%/qthelp, like this:
  79. echo.^> qcollectiongenerator %BUILDDIR%\qthelp\Sentry.qhcp
  80. echo.To view the help file:
  81. echo.^> assistant -collectionFile %BUILDDIR%\qthelp\Sentry.ghc
  82. goto end
  83. )
  84. if "%1" == "devhelp" (
  85. %SPHINXBUILD% -b devhelp %ALLSPHINXOPTS% %BUILDDIR%/devhelp
  86. echo.
  87. echo.Build finished.
  88. goto end
  89. )
  90. if "%1" == "epub" (
  91. %SPHINXBUILD% -b epub %ALLSPHINXOPTS% %BUILDDIR%/epub
  92. echo.
  93. echo.Build finished. The epub file is in %BUILDDIR%/epub.
  94. goto end
  95. )
  96. if "%1" == "latex" (
  97. %SPHINXBUILD% -b latex %ALLSPHINXOPTS% %BUILDDIR%/latex
  98. echo.
  99. echo.Build finished; the LaTeX files are in %BUILDDIR%/latex.
  100. goto end
  101. )
  102. if "%1" == "text" (
  103. %SPHINXBUILD% -b text %ALLSPHINXOPTS% %BUILDDIR%/text
  104. echo.
  105. echo.Build finished. The text files are in %BUILDDIR%/text.
  106. goto end
  107. )
  108. if "%1" == "man" (
  109. %SPHINXBUILD% -b man %ALLSPHINXOPTS% %BUILDDIR%/man
  110. echo.
  111. echo.Build finished. The manual pages are in %BUILDDIR%/man.
  112. goto end
  113. )
  114. if "%1" == "changes" (
  115. %SPHINXBUILD% -b changes %ALLSPHINXOPTS% %BUILDDIR%/changes
  116. echo.
  117. echo.The overview file is in %BUILDDIR%/changes.
  118. goto end
  119. )
  120. if "%1" == "linkcheck" (
  121. %SPHINXBUILD% -b linkcheck %ALLSPHINXOPTS% %BUILDDIR%/linkcheck
  122. echo.
  123. echo.Link check complete; look for any errors in the above output ^
  124. or in %BUILDDIR%/linkcheck/output.txt.
  125. goto end
  126. )
  127. if "%1" == "doctest" (
  128. %SPHINXBUILD% -b doctest %ALLSPHINXOPTS% %BUILDDIR%/doctest
  129. echo.
  130. echo.Testing of doctests in the sources finished, look at the ^
  131. results in %BUILDDIR%/doctest/output.txt.
  132. goto end
  133. )
  134. :end