Show More
@@ -0,0 +1,71 b'' | |||
|
1 | @ECHO OFF | |
|
2 | REM ~ Windows command line make file for Sphinx documentation | |
|
3 | ||
|
4 | SETLOCAL | |
|
5 | ||
|
6 | SET SPHINXOPTS= | |
|
7 | SET SPHINXBUILD=sphinx-build | |
|
8 | SET PAPER= | |
|
9 | SET SRCDIR=source | |
|
10 | ||
|
11 | IF "%PAPER%" == "" SET PAPER=a4 | |
|
12 | SET ALLSPHINXOPTS=-d build\doctrees -D latex_paper_size=%PAPER% %SPHINXOPTS% %SRCDIR% | |
|
13 | ||
|
14 | FOR %%X IN (%SPHINXBUILD%.exe) DO SET P=%%~$PATH:X | |
|
15 | ||
|
16 | FOR %%L IN (html pickle htmlhelp latex changes linkcheck) DO ( | |
|
17 | IF "%1" == "%%L" ( | |
|
18 | IF "%P%" == "" ( | |
|
19 | ECHO. | |
|
20 | ECHO Error: Sphinx is not available. Please make sure it is correctly installed. | |
|
21 | GOTO END | |
|
22 | ) | |
|
23 | MD build\doctrees 2>NUL | |
|
24 | MD build\%1 || GOTO DIR_EXIST | |
|
25 | %SPHINXBUILD% -b %1 %ALLSPHINXOPTS% build\%1 | |
|
26 | IF NOT ERRORLEVEL 0 GOTO ERROR | |
|
27 | ECHO. | |
|
28 | ECHO Build finished. Results are in build\%1. | |
|
29 | IF "%1" == "pickle" ( | |
|
30 | ECHO Now you can process the pickle files or run | |
|
31 | ECHO sphinx-web build\pickle to start the sphinx-web server. | |
|
32 | ) | |
|
33 | IF "%1" == "htmlhelp" ( | |
|
34 | ECHO Now you can run HTML Help Workshop with the | |
|
35 | ECHO .hhp project file in build/htmlhelp. | |
|
36 | ) | |
|
37 | IF "%1" == "linkcheck" ( | |
|
38 | ECHO Look for any errors in the above output | |
|
39 | ECHO or in build\linkcheck\output.txt. | |
|
40 | ) | |
|
41 | GOTO END | |
|
42 | ) | |
|
43 | ) | |
|
44 | ||
|
45 | IF "%1" == "clean" ( | |
|
46 | RD /s /q build dist %SRCDIR%\api\generated 2>NUL | |
|
47 | IF ERRORLEVEL 0 ECHO Build environment cleaned! | |
|
48 | GOTO END | |
|
49 | ) | |
|
50 | ||
|
51 | ECHO. | |
|
52 | ECHO Please use "make [target]" where [target] is one of: | |
|
53 | ECHO. | |
|
54 | ECHO html to make standalone HTML files | |
|
55 | ECHO pickle to make pickle files (usable by e.g. sphinx-web) | |
|
56 | ECHO htmlhelp to make HTML files and a HTML help project | |
|
57 | ECHO latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter | |
|
58 | ECHO changes to make an overview over all changed/added/deprecated items | |
|
59 | ECHO linkcheck to check all external links for integrity | |
|
60 | GOTO END | |
|
61 | ||
|
62 | :DIR_EXIST | |
|
63 | ECHO. | |
|
64 | ECHO Info: Run "make clean" to clean build environment | |
|
65 | ||
|
66 | :ERROR | |
|
67 | ECHO. | |
|
68 | ECHO Error: Build process failed! | |
|
69 | ||
|
70 | :END | |
|
71 | ENDLOCAL No newline at end of file |
General Comments 0
You need to be logged in to leave comments.
Login now