blob: 702695150c3e17a337167ec7a0551c099e649804 [file] [log] [blame]
Georg Brandl3fd0c442008-02-29 18:21:29 +00001@@echo off
Christian Heimesbd865db2008-01-18 11:58:50 +00002setlocal
3
4set SVNROOT=http://svn.python.org/projects
Georg Brandl3fd0c442008-02-29 18:21:29 +00005if "%PYTHON%" EQU "" set PYTHON=..\pcbuild\python
6if "%HTMLHELP%" EQU "" set HTMLHELP=%ProgramFiles%\HTML Help Workshop\hhc.exe
Georg Brandl4af280e2009-04-05 16:30:43 +00007if "%DISTVERSION%" EQU "" for /f "usebackq" %%v in (`%PYTHON% tools/sphinxext/patchlevel.py`) do set DISTVERSION=%%v
Christian Heimesbd865db2008-01-18 11:58:50 +00008
9if "%1" EQU "" goto help
10if "%1" EQU "html" goto build
11if "%1" EQU "htmlhelp" goto build
Georg Brandl700cf282009-01-04 10:23:49 +000012if "%1" EQU "latex" goto build
13if "%1" EQU "text" goto build
14if "%1" EQU "suspicious" goto build
15if "%1" EQU "linkcheck" goto build
16if "%1" EQU "changes" goto build
Christian Heimesbd865db2008-01-18 11:58:50 +000017if "%1" EQU "checkout" goto checkout
18if "%1" EQU "update" goto update
19
20:help
Georg Brandl700cf282009-01-04 10:23:49 +000021set this=%~n0
Christian Heimesbd865db2008-01-18 11:58:50 +000022echo HELP
23echo.
Georg Brandl700cf282009-01-04 10:23:49 +000024echo %this% checkout
25echo %this% update
26echo %this% html
27echo %this% htmlhelp
28echo %this% latex
29echo %this% text
30echo %this% suspicious
31echo %this% linkcheck
32echo %this% changes
Christian Heimesbd865db2008-01-18 11:58:50 +000033echo.
34goto end
35
36:checkout
Georg Brandlfce7b862010-03-13 10:54:12 +000037svn co %SVNROOT%/external/Sphinx-0.6.5/sphinx tools/sphinx
38svn co %SVNROOT%/external/docutils-0.6/docutils tools/docutils
39svn co %SVNROOT%/external/Jinja-2.3.1/jinja2 tools/jinja2
40svn co %SVNROOT%/external/Pygments-1.3.1/pygments tools/pygments
Christian Heimesbd865db2008-01-18 11:58:50 +000041goto end
42
43:update
44svn update tools/sphinx
45svn update tools/docutils
Georg Brandle87a28c2009-01-04 22:03:10 +000046svn update tools/jinja2
Christian Heimesbd865db2008-01-18 11:58:50 +000047svn update tools/pygments
48goto end
49
50:build
51if not exist build mkdir build
52if not exist build\%1 mkdir build\%1
53if not exist build\doctrees mkdir build\doctrees
Georg Brandl700cf282009-01-04 10:23:49 +000054cmd /C %PYTHON% tools\sphinx-build.py -b%1 -dbuild\doctrees . build\%*
Georg Brandl4af280e2009-04-05 16:30:43 +000055if "%1" EQU "htmlhelp" "%HTMLHELP%" build\htmlhelp\python%DISTVERSION:.=%.hhp
Christian Heimesbd865db2008-01-18 11:58:50 +000056goto end
57
Christian Heimesbd865db2008-01-18 11:58:50 +000058:end