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