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