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.

59 lines
1.5 KiB

  1. @@echo off
  2. setlocal
  3. set SVNROOT=http://svn.python.org/projects
  4. if "%PYTHON%" EQU "" set PYTHON=py -2
  5. if "%HTMLHELP%" EQU "" set HTMLHELP=%ProgramFiles%\HTML Help Workshop\hhc.exe
  6. if "%DISTVERSION%" EQU "" for /f "usebackq" %%v in (`%PYTHON% tools/sphinxext/patchlevel.py`) do set DISTVERSION=%%v
  7. if "%1" EQU "" goto help
  8. if "%1" EQU "html" goto build
  9. if "%1" EQU "htmlhelp" goto build
  10. if "%1" EQU "latex" goto build
  11. if "%1" EQU "text" goto build
  12. if "%1" EQU "suspicious" goto build
  13. if "%1" EQU "linkcheck" goto build
  14. if "%1" EQU "changes" goto build
  15. if "%1" EQU "checkout" goto checkout
  16. if "%1" EQU "update" goto update
  17. :help
  18. set this=%~n0
  19. echo HELP
  20. echo.
  21. echo %this% checkout
  22. echo %this% update
  23. echo %this% html
  24. echo %this% htmlhelp
  25. echo %this% latex
  26. echo %this% text
  27. echo %this% suspicious
  28. echo %this% linkcheck
  29. echo %this% changes
  30. echo.
  31. goto end
  32. :checkout
  33. svn co %SVNROOT%/external/Sphinx-1.0.7/sphinx tools/sphinx
  34. svn co %SVNROOT%/external/docutils-0.6/docutils tools/docutils
  35. svn co %SVNROOT%/external/Jinja-2.3.1/jinja2 tools/jinja2
  36. svn co %SVNROOT%/external/Pygments-1.5dev-20120930/pygments tools/pygments
  37. goto end
  38. :update
  39. svn update tools/sphinx
  40. svn update tools/docutils
  41. svn update tools/jinja2
  42. svn update tools/pygments
  43. goto end
  44. :build
  45. if not exist build mkdir build
  46. if not exist build\%1 mkdir build\%1
  47. if not exist build\doctrees mkdir build\doctrees
  48. cmd /C %PYTHON% --version
  49. cmd /C %PYTHON% tools\sphinx-build.py -b%1 -dbuild\doctrees . build\%*
  50. if "%1" EQU "htmlhelp" "%HTMLHELP%" build\htmlhelp\python%DISTVERSION:.=%.hhp
  51. goto end
  52. :end