make.bat 1.58 KB
Newer Older
Martin v. Löwis's avatar
Martin v. Löwis committed
1
@@echo off
2 3 4
setlocal

set SVNROOT=http://svn.python.org/projects
Martin v. Löwis's avatar
Martin v. Löwis committed
5 6
if "%PYTHON%" EQU "" set PYTHON=..\pcbuild\python
if "%HTMLHELP%" EQU "" set HTMLHELP=%ProgramFiles%\HTML Help Workshop\hhc.exe
Benjamin Peterson's avatar
Benjamin Peterson committed
7
if "%DISTVERSION%" EQU "" for /f "usebackq" %%v in (`%PYTHON% tools/sphinxext/patchlevel.py`) do set DISTVERSION=%%v
8 9 10 11

if "%1" EQU "" goto help
if "%1" EQU "html" goto build
if "%1" EQU "htmlhelp" goto build
12 13 14 15 16
if "%1" EQU "latex" goto build
if "%1" EQU "text" goto build
if "%1" EQU "suspicious" goto build
if "%1" EQU "linkcheck" goto build
if "%1" EQU "changes" goto build
17 18 19 20
if "%1" EQU "checkout" goto checkout
if "%1" EQU "update" goto update

:help
21
set this=%~n0
22 23
echo HELP
echo.
24 25 26 27 28 29 30 31 32
echo %this% checkout
echo %this% update
echo %this% html
echo %this% htmlhelp
echo %this% latex
echo %this% text
echo %this% suspicious
echo %this% linkcheck
echo %this% changes
33 34 35 36
echo.
goto end

:checkout
37 38 39 40
svn co %SVNROOT%/external/Sphinx-0.6.5/sphinx tools/sphinx
svn co %SVNROOT%/external/docutils-0.6/docutils tools/docutils
svn co %SVNROOT%/external/Jinja-2.3.1/jinja2 tools/jinja2
svn co %SVNROOT%/external/Pygments-1.3.1/pygments tools/pygments
41 42 43 44 45
goto end

:update
svn update tools/sphinx
svn update tools/docutils
46
svn update tools/jinja2
47 48 49 50 51 52 53
svn update tools/pygments
goto end

:build
if not exist build mkdir build
if not exist build\%1 mkdir build\%1
if not exist build\doctrees mkdir build\doctrees
54
cmd /C %PYTHON% --version
55
cmd /C %PYTHON% tools\sphinx-build.py -b%1 -dbuild\doctrees . build\%*
Benjamin Peterson's avatar
Benjamin Peterson committed
56
if "%1" EQU "htmlhelp" "%HTMLHELP%" build\htmlhelp\python%DISTVERSION:.=%.hhp
57 58 59
goto end

:end