@@ -11,184 +11,38 @@ if NOT "%PAPER%" == "" (
1111 set ALLSPHINXOPTS = -D latex_paper_size=%PAPER% %ALLSPHINXOPTS%
1212)
1313
14+ REM Check if no argument is provided, or if "help" is requested
1415if " %1 " == " " goto help
16+ if " %1 " == " help" goto help
1517
16- if " %1 " == " help" (
17- :help
18- echo . Please use `make ^ < target^ > ` where ^ < target^ > is one of:
19- echo .
20- echo . install-dependencies to install required documentation dependencies
21- echo . html to make standalone HTML files
22- echo . dirhtml to make HTML files with index.html in directories
23- echo . singlehtml to make a single large HTML file
24- echo . pickle to make pickle files
25- echo . json to make JSON files
26- echo . htmlhelp to make HTML files and a HTML help project
27- echo . qthelp to make HTML files and a Qt help project
28- echo . devhelp to make HTML files and a Devhelp project
29- echo . epub to make an EPUB file
30- echo . latex to make LaTeX files (set PAPER=a4 or PAPER=letter)
31- echo . text to make plain text files
32- echo . man to make manual pages
33- echo . texinfo to make Texinfo files
34- echo . gettext to make PO message catalogs
35- echo . changes to generate an overview of changed/added/deprecated items
36- echo . linkcheck to check all external links for integrity
37- echo . clean to remove all generated files
38- echo .
39- goto end
40- )
41-
42-
18+ REM Command options
4319if " %1 " == " install-dependencies" (
4420 echo Installing dependencies...
4521 cd .. && pip install -r doc/requirements.txt
4622 goto end
4723)
4824
4925
50- if " %1 " == " clean" (
51- for /d %%i in (%BUILDDIR% \*) do rmdir /q /s %%i
52- del /q /s %BUILDDIR% \*
53- goto end
54- )
55-
56-
5726if " %1 " == " html" (
27+ echo Building HTML...
5828 %SPHINXBUILD% -b html %ALLSPHINXOPTS% %BUILDDIR% /html
5929 if errorlevel 1 exit /b 1
6030 %SPHINXBUILD% -b linkcheck -q %ALLSPHINXOPTS% %BUILDDIR% /linkcheck
6131 if errorlevel 1 exit /b 1
6232 echo .
63- echo .Link check complete; look for any errors in the above output ^
64- or in %BUILDDIR% /linkcheck/output.txt.
65- goto end
66- )
67-
68- if " %1 " == " dirhtml" (
69- %SPHINXBUILD% -b dirhtml %ALLSPHINXOPTS% %BUILDDIR% /dirhtml
70- if errorlevel 1 exit /b 1
71- echo .
72- echo .Build finished. The HTML pages are in %BUILDDIR% /dirhtml.
73- goto end
74- )
75-
76- if " %1 " == " singlehtml" (
77- %SPHINXBUILD% -b singlehtml %ALLSPHINXOPTS% %BUILDDIR% /singlehtml
78- if errorlevel 1 exit /b 1
79- echo .
80- echo .Build finished. The HTML pages are in %BUILDDIR% /singlehtml.
81- goto end
82- )
83-
84- if " %1 " == " pickle" (
85- %SPHINXBUILD% -b pickle %ALLSPHINXOPTS% %BUILDDIR% /pickle
86- if errorlevel 1 exit /b 1
87- echo .
88- echo .Build finished; now you can process the pickle files.
89- goto end
90- )
91-
92- if " %1 " == " json" (
93- %SPHINXBUILD% -b json %ALLSPHINXOPTS% %BUILDDIR% /json
94- if errorlevel 1 exit /b 1
95- echo .
96- echo .Build finished; now you can process the JSON files.
97- goto end
98- )
99-
100- if " %1 " == " htmlhelp" (
101- %SPHINXBUILD% -b htmlhelp %ALLSPHINXOPTS% %BUILDDIR% /htmlhelp
102- if errorlevel 1 exit /b 1
103- echo .
104- echo .Build finished; now you can run HTML Help Workshop with the ^
105- .hhp project file in %BUILDDIR% /htmlhelp.
106- goto end
107- )
108-
109- if " %1 " == " qthelp" (
110- %SPHINXBUILD% -b qthelp %ALLSPHINXOPTS% %BUILDDIR% /qthelp
111- if errorlevel 1 exit /b 1
112- echo .
113- echo .Build finished; now you can run " qcollectiongenerator" with the ^
114- .qhcp project file in %BUILDDIR% /qthelp, like this:
115- echo .^ > qcollectiongenerator %BUILDDIR% \qthelp\a.qhcp
116- echo .To view the help file:
117- echo .^ > assistant -collectionFile %BUILDDIR% \qthelp\a.ghc
118- goto end
119- )
120-
121- if " %1 " == " devhelp" (
122- %SPHINXBUILD% -b devhelp %ALLSPHINXOPTS% %BUILDDIR% /devhelp
123- if errorlevel 1 exit /b 1
124- echo .
125- echo .Build finished.
126- goto end
127- )
128-
129- if " %1 " == " epub" (
130- %SPHINXBUILD% -b epub %ALLSPHINXOPTS% %BUILDDIR% /epub
131- if errorlevel 1 exit /b 1
132- echo .
133- echo .Build finished. The epub file is in %BUILDDIR% /epub.
134- goto end
135- )
136-
137- if " %1 " == " latex" (
138- %SPHINXBUILD% -b latex %ALLSPHINXOPTS% %BUILDDIR% /latex
139- if errorlevel 1 exit /b 1
140- echo .
141- echo .Build finished; the LaTeX files are in %BUILDDIR% /latex.
142- goto end
143- )
144-
145- if " %1 " == " text" (
146- %SPHINXBUILD% -b text %ALLSPHINXOPTS% %BUILDDIR% /text
147- if errorlevel 1 exit /b 1
148- echo .
149- echo .Build finished. The text files are in %BUILDDIR% /text.
150- goto end
151- )
152-
153- if " %1 " == " man" (
154- %SPHINXBUILD% -b man %ALLSPHINXOPTS% %BUILDDIR% /man
155- if errorlevel 1 exit /b 1
156- echo .
157- echo .Build finished. The manual pages are in %BUILDDIR% /man.
33+ echo Link check complete; look for any errors in the above output or in %BUILDDIR% /linkcheck/output.txt.
15834 goto end
15935)
16036
161- if " %1 " == " texinfo" (
162- %SPHINXBUILD% -b texinfo %ALLSPHINXOPTS% %BUILDDIR% /texinfo
163- if errorlevel 1 exit /b 1
164- echo .
165- echo .Build finished. The Texinfo files are in %BUILDDIR% /texinfo.
166- goto end
167- )
168-
169- if " %1 " == " gettext" (
170- %SPHINXBUILD% -b gettext %ALLSPHINXOPTS% %BUILDDIR% /locale
171- if errorlevel 1 exit /b 1
172- echo .
173- echo .Build finished. The message catalogs are in %BUILDDIR% /locale.
174- goto end
175- )
17637
177- if " %1 " == " changes" (
178- %SPHINXBUILD% -b changes %ALLSPHINXOPTS% %BUILDDIR% /changes
179- if errorlevel 1 exit /b 1
180- echo .
181- echo .The overview file is in %BUILDDIR% /changes.
182- goto end
183- )
184-
185- if " %1 " == " linkcheck" (
186- %SPHINXBUILD% -b linkcheck -q %ALLSPHINXOPTS% %BUILDDIR% /linkcheck
187- if errorlevel 1 exit /b 1
188- echo .
189- echo .Link check complete; look for any errors in the above output ^
190- or in %BUILDDIR% /linkcheck/output.txt.
191- goto end
192- )
38+ REM Help section
39+ :help
40+ echo . Please use `make ^ < target^ > ` where ^ < target^ > is one of:
41+ echo .
42+ echo . install-dependencies to install required documentation dependencies
43+ echo . html to make standalone HTML files
44+ echo .
45+ goto end
19346
19447:end
48+ echo Script completed.
0 commit comments