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