Skip to content

Commit b276182

Browse files
committed
Allow chaining commands in make.bat
1 parent cd7f1f1 commit b276182

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

docs/make.bat

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,20 @@ if errorlevel 9009 (
2525

2626
if "%1" == "" goto help
2727

28-
%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
28+
:process_targets
29+
if "%1" == "clean" (
30+
if exist "%BUILDDIR%" rmdir /s /q "%BUILDDIR%"
31+
if exist "%SOURCEDIR%\api_generated" rmdir /s /q "%SOURCEDIR%\api_generated"
32+
if exist "%SOURCEDIR%\auto_examples" rmdir /s /q "%SOURCEDIR%\auto_examples"
33+
if exist "%SOURCEDIR%\sg_execution_times.rst" del /q "%SOURCEDIR%\sg_execution_times.rst"
34+
) else (
35+
%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
36+
if errorlevel 1 goto end
37+
)
38+
39+
shift
40+
if not "%1" == "" goto process_targets
41+
2942
goto end
3043

3144
:help

0 commit comments

Comments
 (0)