make.bat 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121
  1. @ECHO OFF
  2. REM Command file for Sphinx documentation
  3. set SPHINXBUILD=sphinx-build
  4. set BUILDDIR=build
  5. set ALLSPHINXOPTS=-d %BUILDDIR%/doctrees %SPHINXOPTS% .
  6. if NOT "%PAPER%" == "" (
  7. set ALLSPHINXOPTS=-D latex_paper_size=%PAPER% %ALLSPHINXOPTS%
  8. )
  9. if "%1" == "" goto help
  10. if "%1" == "help" (
  11. :help
  12. echo.Please use `make ^<target^>` where ^<target^> is one of
  13. echo. html to make standalone HTML files
  14. echo. pdf to make PDF document
  15. echo. dirhtml to make HTML files named index.html in directories
  16. echo. pickle to make pickle files
  17. echo. json to make JSON files
  18. echo. htmlhelp to make HTML files and a HTML help project
  19. echo. qthelp to make HTML files and a qthelp project
  20. echo. latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter
  21. echo. changes to make an overview over all changed/added/deprecated items
  22. echo. linkcheck to check all external links for integrity
  23. echo. doctest to run all doctests embedded in the documentation if enabled
  24. goto end
  25. )
  26. if "%1" == "clean" (
  27. for /d %%i in (%BUILDDIR%\*) do rmdir /q /s %%i
  28. del /q /s %BUILDDIR%\*
  29. goto end
  30. )
  31. if "%1" == "html" (
  32. %SPHINXBUILD% -b html %ALLSPHINXOPTS% %BUILDDIR%/html
  33. echo.
  34. echo.Build finished. The HTML pages are in %BUILDDIR%/html.
  35. goto end
  36. )
  37. if "%1" == "dirhtml" (
  38. %SPHINXBUILD% -b dirhtml %ALLSPHINXOPTS% %BUILDDIR%/dirhtml
  39. echo.
  40. echo.Build finished. The HTML pages are in %BUILDDIR%/dirhtml.
  41. goto end
  42. )
  43. if "%1" == "pickle" (
  44. %SPHINXBUILD% -b pickle %ALLSPHINXOPTS% %BUILDDIR%/pickle
  45. echo.
  46. echo.Build finished; now you can process the pickle files.
  47. goto end
  48. )
  49. if "%1" == "json" (
  50. %SPHINXBUILD% -b json %ALLSPHINXOPTS% %BUILDDIR%/json
  51. echo.
  52. echo.Build finished; now you can process the JSON files.
  53. goto end
  54. )
  55. if "%1" == "htmlhelp" (
  56. %SPHINXBUILD% -b htmlhelp %ALLSPHINXOPTS% %BUILDDIR%/htmlhelp
  57. echo.
  58. echo.Build finished; now you can run HTML Help Workshop with the ^
  59. .hhp project file in %BUILDDIR%/htmlhelp.
  60. goto end
  61. )
  62. if "%1" == "qthelp" (
  63. %SPHINXBUILD% -b qthelp %ALLSPHINXOPTS% %BUILDDIR%/qthelp
  64. echo.
  65. echo.Build finished; now you can run "qcollectiongenerator" with the ^
  66. .qhcp project file in %BUILDDIR%/qthelp, like this:
  67. echo.^> qcollectiongenerator %BUILDDIR%\qthelp\dulwich.qhcp
  68. echo.To view the help file:
  69. echo.^> assistant -collectionFile %BUILDDIR%\qthelp\dulwich.ghc
  70. goto end
  71. )
  72. if "%1" == "latex" (
  73. %SPHINXBUILD% -b latex %ALLSPHINXOPTS% %BUILDDIR%/latex
  74. echo.
  75. echo.Build finished; the LaTeX files are in %BUILDDIR%/latex.
  76. goto end
  77. )
  78. if "%1" == "changes" (
  79. %SPHINXBUILD% -b changes %ALLSPHINXOPTS% %BUILDDIR%/changes
  80. echo.
  81. echo.The overview file is in %BUILDDIR%/changes.
  82. goto end
  83. )
  84. if "%1" == "linkcheck" (
  85. %SPHINXBUILD% -b linkcheck %ALLSPHINXOPTS% %BUILDDIR%/linkcheck
  86. echo.
  87. echo.Link check complete; look for any errors in the above output ^
  88. or in %BUILDDIR%/linkcheck/output.txt.
  89. goto end
  90. )
  91. if "%1" == "doctest" (
  92. %SPHINXBUILD% -b doctest %ALLSPHINXOPTS% %BUILDDIR%/doctest
  93. echo.
  94. echo.Testing of doctests in the sources finished, look at the ^
  95. results in %BUILDDIR%/doctest/output.txt.
  96. goto end
  97. )
  98. if "%1" == "pdf" (
  99. %SPHINXBUILD% -b pdf %ALLSPHINXOPTS% %BUILDDIR%/pdf
  100. echo.
  101. echo.Build finished. The PDF files are in %BUILDDIR%/pdf.
  102. goto end
  103. )
  104. :end