You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

55 lines
1.1 KiB

  1. @ECHO OFF
  2. REM Command file for Sphinx documentation
  3. pushd %~dp0
  4. if "%SPHINXBUILD%" == "" (
  5. set SPHINXBUILD=sphinx-build
  6. )
  7. set BUILDDIR=../docs
  8. set ALLSPHINXOPTS= .
  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. goto end
  15. )
  16. REM Check if sphinx-build is available and fallback to Python version if any
  17. %SPHINXBUILD% 1>NUL 2>NUL
  18. if errorlevel 9009 goto sphinx_python
  19. goto sphinx_ok
  20. :sphinx_python
  21. set SPHINXBUILD=python -m sphinx.__init__
  22. %SPHINXBUILD% 2> nul
  23. if errorlevel 9009 (
  24. echo.
  25. echo.The 'sphinx-build' command was not found. Make sure you have Sphinx
  26. echo.installed, then set the SPHINXBUILD environment variable to point
  27. echo.to the full path of the 'sphinx-build' executable. Alternatively you
  28. echo.may add the Sphinx directory to PATH.
  29. echo.
  30. echo.If you don't have Sphinx installed, grab it from
  31. echo.http://sphinx-doc.org/
  32. exit /b 1
  33. )
  34. :sphinx_ok
  35. if "%1" == "html" (
  36. %SPHINXBUILD% -b html %ALLSPHINXOPTS% %BUILDDIR%
  37. if errorlevel 1 exit /b 1
  38. echo.
  39. echo.Build finished. The HTML pages are in %BUILDDIR%.
  40. goto end
  41. )
  42. :end
  43. popd