/Doc/make.bat

http://unladen-swallow.googlecode.com/ · Batch · 58 lines · 51 code · 7 blank · 0 comment · 18 complexity · 0f0672892611f2edbade02118df8af4d MD5 · raw file

  1. @@echo off
  2. setlocal
  3. set SVNROOT=http://svn.python.org/projects
  4. if "%PYTHON%" EQU "" set PYTHON=..\pcbuild\python
  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-0.6.2/sphinx tools/sphinx
  34. svn co %SVNROOT%/external/docutils-0.5/docutils tools/docutils
  35. svn co %SVNROOT%/external/Jinja-2.1.1/jinja2 tools/jinja2
  36. svn co %SVNROOT%/external/Pygments-0.11.1/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% tools\sphinx-build.py -b%1 -dbuild\doctrees . build\%*
  49. if "%1" EQU "htmlhelp" "%HTMLHELP%" build\htmlhelp\python%DISTVERSION:.=%.hhp
  50. goto end
  51. :end