Skip to content

Commit 3ee7c1b

Browse files
committed
Remove generated rst files during docs build when calling make clean. Fix SOURCEDIR in make.bat.
1 parent a2950e2 commit 3ee7c1b

2 files changed

Lines changed: 14 additions & 0 deletions

File tree

Makefile

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,3 +18,8 @@ help:
1818
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
1919
%: Makefile
2020
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
21+
22+
clean:
23+
rm -rf $(BUILDDIR)/*
24+
rm -rf docs/auto_examples/
25+
rm -rf docs/api/generated/

make.bat

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,15 @@ if errorlevel 9009 (
2323
exit /b 1
2424
)
2525

26+
if "%1" == "clean" (
27+
for /d %%i in (%BUILDDIR%\*) do rmdir /q /s %%i
28+
del /q /s %BUILDDIR%\*
29+
rmdir /q /s docs\api\generated
30+
rmdir /q /s docs\auto_examples
31+
goto end
32+
)
33+
34+
2635
if "%1" == "" goto help
2736

2837
%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%

0 commit comments

Comments
 (0)