FreeCAD

Форк
0
/
make.bat 
170 строк · 4.4 Кб
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
	goto end
41
)
42

43
if "%1" == "html" (
44
	%SPHINXBUILD% -b html %ALLSPHINXOPTS% %BUILDDIR%/html
45
	if errorlevel 1 exit /b 1
46
	echo.
47
	echo.Build finished. The HTML pages are in %BUILDDIR%/html.
48
	goto end
49
)
50

51
if "%1" == "dirhtml" (
52
	%SPHINXBUILD% -b dirhtml %ALLSPHINXOPTS% %BUILDDIR%/dirhtml
53
	if errorlevel 1 exit /b 1
54
	echo.
55
	echo.Build finished. The HTML pages are in %BUILDDIR%/dirhtml.
56
	goto end
57
)
58

59
if "%1" == "singlehtml" (
60
	%SPHINXBUILD% -b singlehtml %ALLSPHINXOPTS% %BUILDDIR%/singlehtml
61
	if errorlevel 1 exit /b 1
62
	echo.
63
	echo.Build finished. The HTML pages are in %BUILDDIR%/singlehtml.
64
	goto end
65
)
66

67
if "%1" == "pickle" (
68
	%SPHINXBUILD% -b pickle %ALLSPHINXOPTS% %BUILDDIR%/pickle
69
	if errorlevel 1 exit /b 1
70
	echo.
71
	echo.Build finished; now you can process the pickle files.
72
	goto end
73
)
74

75
if "%1" == "json" (
76
	%SPHINXBUILD% -b json %ALLSPHINXOPTS% %BUILDDIR%/json
77
	if errorlevel 1 exit /b 1
78
	echo.
79
	echo.Build finished; now you can process the JSON files.
80
	goto end
81
)
82

83
if "%1" == "htmlhelp" (
84
	%SPHINXBUILD% -b htmlhelp %ALLSPHINXOPTS% %BUILDDIR%/htmlhelp
85
	if errorlevel 1 exit /b 1
86
	echo.
87
	echo.Build finished; now you can run HTML Help Workshop with the ^
88
.hhp project file in %BUILDDIR%/htmlhelp.
89
	goto end
90
)
91

92
if "%1" == "qthelp" (
93
	%SPHINXBUILD% -b qthelp %ALLSPHINXOPTS% %BUILDDIR%/qthelp
94
	if errorlevel 1 exit /b 1
95
	echo.
96
	echo.Build finished; now you can run "qcollectiongenerator" with the ^
97
.qhcp project file in %BUILDDIR%/qthelp, like this:
98
	echo.^> qcollectiongenerator %BUILDDIR%\qthelp\FreeCAD.qhcp
99
	echo.To view the help file:
100
	echo.^> assistant -collectionFile %BUILDDIR%\qthelp\FreeCAD.ghc
101
	goto end
102
)
103

104
if "%1" == "devhelp" (
105
	%SPHINXBUILD% -b devhelp %ALLSPHINXOPTS% %BUILDDIR%/devhelp
106
	if errorlevel 1 exit /b 1
107
	echo.
108
	echo.Build finished.
109
	goto end
110
)
111

112
if "%1" == "epub" (
113
	%SPHINXBUILD% -b epub %ALLSPHINXOPTS% %BUILDDIR%/epub
114
	if errorlevel 1 exit /b 1
115
	echo.
116
	echo.Build finished. The epub file is in %BUILDDIR%/epub.
117
	goto end
118
)
119

120
if "%1" == "latex" (
121
	%SPHINXBUILD% -b latex %ALLSPHINXOPTS% %BUILDDIR%/latex
122
	if errorlevel 1 exit /b 1
123
	echo.
124
	echo.Build finished; the LaTeX files are in %BUILDDIR%/latex.
125
	goto end
126
)
127

128
if "%1" == "text" (
129
	%SPHINXBUILD% -b text %ALLSPHINXOPTS% %BUILDDIR%/text
130
	if errorlevel 1 exit /b 1
131
	echo.
132
	echo.Build finished. The text files are in %BUILDDIR%/text.
133
	goto end
134
)
135

136
if "%1" == "man" (
137
	%SPHINXBUILD% -b man %ALLSPHINXOPTS% %BUILDDIR%/man
138
	if errorlevel 1 exit /b 1
139
	echo.
140
	echo.Build finished. The manual pages are in %BUILDDIR%/man.
141
	goto end
142
)
143

144
if "%1" == "changes" (
145
	%SPHINXBUILD% -b changes %ALLSPHINXOPTS% %BUILDDIR%/changes
146
	if errorlevel 1 exit /b 1
147
	echo.
148
	echo.The overview file is in %BUILDDIR%/changes.
149
	goto end
150
)
151

152
if "%1" == "linkcheck" (
153
	%SPHINXBUILD% -b linkcheck %ALLSPHINXOPTS% %BUILDDIR%/linkcheck
154
	if errorlevel 1 exit /b 1
155
	echo.
156
	echo.Link check complete; look for any errors in the above output ^
157
or in %BUILDDIR%/linkcheck/output.txt.
158
	goto end
159
)
160

161
if "%1" == "doctest" (
162
	%SPHINXBUILD% -b doctest %ALLSPHINXOPTS% %BUILDDIR%/doctest
163
	if errorlevel 1 exit /b 1
164
	echo.
165
	echo.Testing of doctests in the sources finished, look at the ^
166
results in %BUILDDIR%/doctest/output.txt.
167
	goto end
168
)
169

170
:end
171

Использование cookies

Мы используем файлы cookie в соответствии с Политикой конфиденциальности и Политикой использования cookies.

Нажимая кнопку «Принимаю», Вы даете АО «СберТех» согласие на обработку Ваших персональных данных в целях совершенствования нашего веб-сайта и Сервиса GitVerse, а также повышения удобства их использования.

Запретить использование cookies Вы можете самостоятельно в настройках Вашего браузера.