Debian Codegraph @

docs/make.bat

raw
1 @ECHO OFF
2
3 REM Command file for Sphinx documentation
4
5 if "%SPHINXBUILD%" == "" (
6 set SPHINXBUILD=sphinx-build
7 )
8 if "%SPHINXAPIDOC%" == "" (
9 set SPHINXAPIDOC=sphinx-apidoc
10 )
11 set BUILDDIR=_build
12 set RSTDIR=source
13 set SRCDIR=../src
14 set GALLERYDIR=gallery
15 set PKGNAME=hdmf
16 set ALLSPHINXOPTS=-d %BUILDDIR%/doctrees %SPHINXOPTS% %RSTDIR%
17 set I18NSPHINXOPTS=%SPHINXOPTS% .
18 if NOT "%PAPER%" == "" (
19 set ALLSPHINXOPTS=-D latex_paper_size=%PAPER% %ALLSPHINXOPTS%
20 set I18NSPHINXOPTS=-D latex_paper_size=%PAPER% %I18NSPHINXOPTS%
21 )
22
23 if "%1" == "" goto help
24
25 if "%1" == "help" (
26 :help
27 echo.Please use `make ^<target^>` where ^<target^> is one of
28 echo. html to make standalone HTML files
29 echo. dirhtml to make HTML files named index.html in directories
30 echo. singlehtml to make a single large HTML file
31 echo. pickle to make pickle files
32 echo. json to make JSON files
33 echo. htmlhelp to make HTML files and a HTML help project
34 echo. qthelp to make HTML files and a qthelp project
35 echo. devhelp to make HTML files and a Devhelp project
36 echo. epub to make an epub
37 echo. latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter
38 echo. text to make text files
39 echo. man to make manual pages
40 echo. texinfo to make Texinfo files
41 echo. gettext to make PO message catalogs
42 echo. changes to make an overview over all changed/added/deprecated items
43 echo. linkcheck to check all external links for integrity
44 echo. doctest to run all doctests embedded in the documentation if enabled
45 echo. clean to clean all documents built by Sphinx in _build
46 echo. apidoc to build RST from source code"
47 goto end
48 )
49
50 if "%1" == "clean" (
51 for /d %%i in (%BUILDDIR%\*) do rmdir /q /s %%i
52 del /q /s %BUILDDIR%\*
53 del /q %RSTDIR%\%PKGNAME%*.rst
54 del /q %GALLERYDIR%\*.hdf5
55 del /q %GALLERYDIR%\*.sqlite
56 rmdir /q /s %RSTDIR%\tutorials
57 goto end
58 )
59
60 if "%1" == "html" (
61 %SPHINXBUILD% -b html %ALLSPHINXOPTS% %BUILDDIR%/html
62 if errorlevel 1 exit /b 1
63 echo.
64 echo.Build finished. The HTML pages are in %BUILDDIR%/html.
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\sample.qhcp
116 echo.To view the help file:
117 echo.^> assistant -collectionFile %BUILDDIR%\qthelp\sample.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.
158 goto end
159 )
160
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 %I18NSPHINXOPTS% %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 )
176
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% -W -b linkcheck %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 )
193
194 if "%1" == "doctest" (
195 %SPHINXBUILD% -b doctest %ALLSPHINXOPTS% %BUILDDIR%/doctest
196 if errorlevel 1 exit /b 1
197 echo.
198 echo.Testing of doctests in the sources finished, look at the ^
199 results in %BUILDDIR%/doctest/output.txt.
200 goto end
201 )
202
203 if "%1" == "apidoc" (
204 %SPHINXAPIDOC% -f -e --no-toc -o %RSTDIR% %SRCDIR%
205 if errorlevel 1 exit /b 1
206 echo.
207 echo.Build rst docs from source code.
208 goto end
209 )
210
211 :end