-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmake.bat
More file actions
82 lines (74 loc) · 2.7 KB
/
Copy pathmake.bat
File metadata and controls
82 lines (74 loc) · 2.7 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
@@echo off
setlocal
set SVNROOT=http://svn.python.org/projects
::if "%PYTHON%" EQU "" set PYTHON=..\pcbuild\python
if "%HTMLHELP%" EQU "" if "%ProgramFiles(x86)%" EQU "" set HTMLHELP=%ProgramFiles%\HTML Help Workshop\hhc.exe
if "%HTMLHELP%" EQU "" if "%ProgramFiles(x86)%" NEQ "" set HTMLHELP=%ProgramFiles(x86)%\HTML Help Workshop\hhc.exe
if "%DISTVERSION%" EQU "" for /f "usebackq" %%v in (`tools\sphinxext\patchlevel.py`) do set DISTVERSION=%%v
if "%1" EQU "" goto help
if "%1" EQU "html" goto build
if "%1" EQU "htmlhelp" goto build
if "%1" EQU "epub" goto build
if "%1" EQU "latex" goto build
if "%1" EQU "latexpdf" goto latexpdf
if "%1" EQU "text" goto build
if "%1" EQU "suspicious" goto build
if "%1" EQU "linkcheck" goto build
if "%1" EQU "changes" goto build
if "%1" EQU "checkout" goto checkout
if "%1" EQU "update" goto update
:help
set this=%~n0
echo HELP
echo.
echo %this% checkout
echo %this% update
echo %this% html
echo %this% htmlhelp
echo %this% epub
echo %this% latex
echo %this% latexpdf
echo %this% text
echo %this% suspicious
echo %this% linkcheck
echo %this% changes
echo.
goto end
:checkout
::svn co %SVNROOT%/external/Sphinx-0.6.5/sphinx tools/sphinx
hg clone https://bitbucket.org/uchida/sphinx -b py27ja-release tools/sphinx
::svn co %SVNROOT%/external/docutils-0.6/docutils tools/docutils
svn export http://docutils.svn.sourceforge.net/svnroot/docutils/tags/docutils-0.7/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
goto end
:update
::svn update tools/sphinx
hg --cwd tools/sphinx pull -ufb py27ja-release
svn update tools/docutils
svn update tools/jinja2
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
tools\sphinx-build.py -b%1 -dbuild\doctrees . build\%*
if "%1" EQU "htmlhelp" "%HTMLHELP%" build\htmlhelp\python%DISTVERSION:.=%.hhp
goto end
:latexpdf
if not exist build mkdir build
if not exist build\latex mkdir build\latex
if not exist build\doctrees mkdir build\doctrees
tools\sphinx-build.py -blatex -dbuild\doctrees . build\latex
cd build\latex
for %%f in (*.pdf *.png *.gif *.jpg *.jpeg) do extractbb %%f
for %%f in (*.tex) do platex -kanji=utf8 %LATEXOPTS% %%f
for %%f in (*.tex) do platex -kanji=utf8 %LATEXOPTS% %%f
for %%f in (*.tex) do platex -kanji=utf8 %LATEXOPTS% %%f
for %%f in (*.idx) do mendex -U -f -d `basename %%f .idx`.dic -s python.ist %%f
for %%f in (*.tex) do platex -kanji=utf8 %LATEXOPTS% %%f
for %%f in (*.tex) do platex -kanji=utf8 %LATEXOPTS% %%f
for %%f in (*.dvi) do dvipdfmx %%f
goto end
:end