Code

Ticket #16414: 16414.diff

File 16414.diff, 4.7 KB (added by aaugustin, 3 years ago)
Line 
1Index: docs/make.bat
2===================================================================
3--- docs/make.bat       (revision 0)
4+++ docs/make.bat       (revision 0)
5@@ -0,0 +1,170 @@
6+@ECHO OFF
7+
8+REM Command file for Sphinx documentation
9+
10+if "%SPHINXBUILD%" == "" (
11+       set SPHINXBUILD=sphinx-build
12+)
13+set BUILDDIR=_build
14+set ALLSPHINXOPTS=-d %BUILDDIR%/doctrees %SPHINXOPTS% .
15+if NOT "%PAPER%" == "" (
16+       set ALLSPHINXOPTS=-D latex_paper_size=%PAPER% %ALLSPHINXOPTS%
17+)
18+
19+if "%1" == "" goto help
20+
21+if "%1" == "help" (
22+       :help
23+       echo.Please use `make ^<target^>` where ^<target^> is one of
24+       echo.  html       to make standalone HTML files
25+       echo.  dirhtml    to make HTML files named index.html in directories
26+       echo.  singlehtml to make a single large HTML file
27+       echo.  pickle     to make pickle files
28+       echo.  json       to make JSON files
29+       echo.  htmlhelp   to make HTML files and a HTML help project
30+       echo.  qthelp     to make HTML files and a qthelp project
31+       echo.  devhelp    to make HTML files and a Devhelp project
32+       echo.  epub       to make an epub
33+       echo.  latex      to make LaTeX files, you can set PAPER=a4 or PAPER=letter
34+       echo.  text       to make text files
35+       echo.  man        to make manual pages
36+       echo.  changes    to make an overview over all changed/added/deprecated items
37+       echo.  linkcheck  to check all external links for integrity
38+       echo.  doctest    to run all doctests embedded in the documentation if enabled
39+       goto end
40+)
41+
42+if "%1" == "clean" (
43+       for /d %%i in (%BUILDDIR%\*) do rmdir /q /s %%i
44+       del /q /s %BUILDDIR%\*
45+       goto end
46+)
47+
48+if "%1" == "html" (
49+       %SPHINXBUILD% -b djangohtml %ALLSPHINXOPTS% %BUILDDIR%/html
50+       if errorlevel 1 exit /b 1
51+       echo.
52+       echo.Build finished. The HTML pages are in %BUILDDIR%/html.
53+       goto end
54+)
55+
56+if "%1" == "dirhtml" (
57+       %SPHINXBUILD% -b dirhtml %ALLSPHINXOPTS% %BUILDDIR%/dirhtml
58+       if errorlevel 1 exit /b 1
59+       echo.
60+       echo.Build finished. The HTML pages are in %BUILDDIR%/dirhtml.
61+       goto end
62+)
63+
64+if "%1" == "singlehtml" (
65+       %SPHINXBUILD% -b singlehtml %ALLSPHINXOPTS% %BUILDDIR%/singlehtml
66+       if errorlevel 1 exit /b 1
67+       echo.
68+       echo.Build finished. The HTML pages are in %BUILDDIR%/singlehtml.
69+       goto end
70+)
71+
72+if "%1" == "pickle" (
73+       %SPHINXBUILD% -b pickle %ALLSPHINXOPTS% %BUILDDIR%/pickle
74+       if errorlevel 1 exit /b 1
75+       echo.
76+       echo.Build finished; now you can process the pickle files.
77+       goto end
78+)
79+
80+if "%1" == "json" (
81+       %SPHINXBUILD% -b json %ALLSPHINXOPTS% %BUILDDIR%/json
82+       if errorlevel 1 exit /b 1
83+       echo.
84+       echo.Build finished; now you can process the JSON files.
85+       goto end
86+)
87+
88+if "%1" == "htmlhelp" (
89+       %SPHINXBUILD% -b htmlhelp %ALLSPHINXOPTS% %BUILDDIR%/htmlhelp
90+       if errorlevel 1 exit /b 1
91+       echo.
92+       echo.Build finished; now you can run HTML Help Workshop with the ^
93+.hhp project file in %BUILDDIR%/htmlhelp.
94+       goto end
95+)
96+
97+if "%1" == "qthelp" (
98+       %SPHINXBUILD% -b qthelp %ALLSPHINXOPTS% %BUILDDIR%/qthelp
99+       if errorlevel 1 exit /b 1
100+       echo.
101+       echo.Build finished; now you can run "qcollectiongenerator" with the ^
102+.qhcp project file in %BUILDDIR%/qthelp, like this:
103+       echo.^> qcollectiongenerator %BUILDDIR%\qthelp\django.qhcp
104+       echo.To view the help file:
105+       echo.^> assistant -collectionFile %BUILDDIR%\qthelp\django.qhc
106+       goto end
107+)
108+
109+if "%1" == "devhelp" (
110+       %SPHINXBUILD% -b devhelp %ALLSPHINXOPTS% %BUILDDIR%/devhelp
111+       if errorlevel 1 exit /b 1
112+       echo.
113+       echo.Build finished.
114+       goto end
115+)
116+
117+if "%1" == "epub" (
118+       %SPHINXBUILD% -b epub %ALLSPHINXOPTS% %BUILDDIR%/epub
119+       if errorlevel 1 exit /b 1
120+       echo.
121+       echo.Build finished. The epub file is in %BUILDDIR%/epub.
122+       goto end
123+)
124+
125+if "%1" == "latex" (
126+       %SPHINXBUILD% -b latex %ALLSPHINXOPTS% %BUILDDIR%/latex
127+       if errorlevel 1 exit /b 1
128+       echo.
129+       echo.Build finished; the LaTeX files are in %BUILDDIR%/latex.
130+       goto end
131+)
132+
133+if "%1" == "text" (
134+       %SPHINXBUILD% -b text %ALLSPHINXOPTS% %BUILDDIR%/text
135+       if errorlevel 1 exit /b 1
136+       echo.
137+       echo.Build finished. The text files are in %BUILDDIR%/text.
138+       goto end
139+)
140+
141+if "%1" == "man" (
142+       %SPHINXBUILD% -b man %ALLSPHINXOPTS% %BUILDDIR%/man
143+       if errorlevel 1 exit /b 1
144+       echo.
145+       echo.Build finished. The manual pages are in %BUILDDIR%/man.
146+       goto end
147+)
148+
149+if "%1" == "changes" (
150+       %SPHINXBUILD% -b changes %ALLSPHINXOPTS% %BUILDDIR%/changes
151+       if errorlevel 1 exit /b 1
152+       echo.
153+       echo.The overview file is in %BUILDDIR%/changes.
154+       goto end
155+)
156+
157+if "%1" == "linkcheck" (
158+       %SPHINXBUILD% -b linkcheck %ALLSPHINXOPTS% %BUILDDIR%/linkcheck
159+       if errorlevel 1 exit /b 1
160+       echo.
161+       echo.Link check complete; look for any errors in the above output ^
162+or in %BUILDDIR%/linkcheck/output.txt.
163+       goto end
164+)
165+
166+if "%1" == "doctest" (
167+       %SPHINXBUILD% -b doctest %ALLSPHINXOPTS% %BUILDDIR%/doctest
168+       if errorlevel 1 exit /b 1
169+       echo.
170+       echo.Testing of doctests in the sources finished, look at the ^
171+results in %BUILDDIR%/doctest/output.txt.
172+       goto end
173+)
174+
175+:end