make.bat 4.4 KB

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