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