Skip to content

Commit 1a4367e

Browse files
gepcelcvanelteren
andauthored
add make.bat (#475)
Co-authored-by: Casper van Elteren <caspervanelteren@gmail.com>
1 parent 32e1f40 commit 1a4367e

File tree

1 file changed

+41
-0
lines changed

1 file changed

+41
-0
lines changed

docs/make.bat

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
@echo off
2+
REM Minimal make.bat for Sphinx documentation
3+
REM You can set these variables from the command line.
4+
5+
REM Set default variables
6+
set SPHINXOPTS=
7+
set SPHINXBUILD=sphinx-build
8+
set SPHINXPROJ=UltraPlot
9+
set SOURCEDIR=.
10+
set BUILDDIR=_build
11+
12+
REM Check if no arguments were provided (show help)
13+
if "%1"=="" goto help
14+
15+
REM Route to the appropriate target
16+
if "%1"=="help" goto help
17+
if "%1"=="clean" goto clean
18+
19+
REM Catch-all target: route all unknown targets to Sphinx
20+
goto catchall
21+
22+
23+
:help
24+
REM Put it first so that "make" without argument is like "make help".
25+
%SPHINXBUILD% -M help "%SOURCEDIR%" "%BUILDDIR%" %SPHINXOPTS%
26+
goto :eof
27+
28+
29+
:clean
30+
REM Make clean ignore .git folder
31+
REM The /q doesn't raise error when files/folders not found
32+
if exist api\ rmdir /s /q api\
33+
if exist "%BUILDDIR%\html\" rmdir /s /q "%BUILDDIR%\html\"
34+
if exist "%BUILDDIR%\doctrees\" rmdir /s /q "%BUILDDIR%\doctrees\"
35+
goto :eof
36+
37+
38+
:catchall
39+
REM Route target to Sphinx using the "make mode" option
40+
%SPHINXBUILD% -M %1 "%SOURCEDIR%" "%BUILDDIR%" %SPHINXOPTS%
41+
goto :eof

0 commit comments

Comments
 (0)