blob: 75bd40373778163d43434865365e33944bf989c1 [file] [log] [blame]
Martin v. Löwis1561bab2008-02-29 19:39:25 +00001@@echo off
Christian Heimes04c420f2008-01-18 18:40:46 +00002setlocal
3
4set SVNROOT=http://svn.python.org/projects
Martin v. Löwis1561bab2008-02-29 19:39:25 +00005if "%PYTHON%" EQU "" set PYTHON=..\pcbuild\python
6if "%HTMLHELP%" EQU "" set HTMLHELP=%ProgramFiles%\HTML Help Workshop\hhc.exe
Benjamin Petersonef3e4c22009-04-11 19:48:14 +00007if "%DISTVERSION%" EQU "" for /f "usebackq" %%v in (`%PYTHON% tools/sphinxext/patchlevel.py`) do set DISTVERSION=%%v
Christian Heimes04c420f2008-01-18 18:40:46 +00008
9if "%1" EQU "" goto help
10if "%1" EQU "html" goto build
11if "%1" EQU "htmlhelp" goto build
Benjamin Peterson28d88b42009-01-09 03:03:23 +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 Heimes04c420f2008-01-18 18:40:46 +000017if "%1" EQU "checkout" goto checkout
18if "%1" EQU "update" goto update
19
20:help
Benjamin Peterson28d88b42009-01-09 03:03:23 +000021set this=%~n0
Christian Heimes04c420f2008-01-18 18:40:46 +000022echo HELP
23echo.
Benjamin Peterson28d88b42009-01-09 03:03:23 +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 Heimes04c420f2008-01-18 18:40:46 +000033echo.
34goto end
35
36:checkout
Georg Brandlcfa8e292010-11-12 08:09:11 +000037svn co %SVNROOT%/external/Sphinx-1.0.5/sphinx tools/sphinx
Georg Brandld94b4a72010-03-13 10:56:09 +000038svn 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 Heimes04c420f2008-01-18 18:40:46 +000041goto end
42
43:update
44svn update tools/sphinx
45svn update tools/docutils
Benjamin Peterson28d88b42009-01-09 03:03:23 +000046svn update tools/jinja2
Christian Heimes04c420f2008-01-18 18:40:46 +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
Raymond Hettingerd99fe9f2009-04-07 21:19:16 +000054cmd /C %PYTHON% --version
Benjamin Peterson28d88b42009-01-09 03:03:23 +000055cmd /C %PYTHON% tools\sphinx-build.py -b%1 -dbuild\doctrees . build\%*
Benjamin Petersonef3e4c22009-04-11 19:48:14 +000056if "%1" EQU "htmlhelp" "%HTMLHELP%" build\htmlhelp\python%DISTVERSION:.=%.hhp
Christian Heimes04c420f2008-01-18 18:40:46 +000057goto end
58
Christian Heimes04c420f2008-01-18 18:40:46 +000059:end