Skip to content

Commit 4cc6c65

Browse files
authored
make clean: also delete generated, auto_examples, savefig (#1122)
1 parent 5a73ba8 commit 4cc6c65

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

docs/sphinx/Makefile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,9 @@ help:
4848

4949
clean:
5050
rm -rf $(BUILDDIR)/*
51+
rm -rf source/generated
52+
rm -rf source/auto_examples
53+
rm -rf source/savefig
5154

5255
html:
5356
$(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html

docs/sphinx/make.bat

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,17 @@ set BUILDDIR=build
1212

1313
if "%1" == "" goto help
1414

15+
16+
if "%1" == "clean" (
17+
REM override the default `make clean` behavior of sphinx-build;
18+
REM this lets us clean out the various build files in sphinx/source/
19+
for /d %%i in (%BUILDDIR%\*) do rmdir /q /s %%i
20+
rmdir /q /s %SOURCEDIR%\generated >nul 2>&1
21+
rmdir /q /s %SOURCEDIR%\auto_examples >nul 2>&1
22+
rmdir /q /s %SOURCEDIR%\savefig >nul 2>&1
23+
goto end
24+
)
25+
1526
%SPHINXBUILD% >NUL 2>NUL
1627
if errorlevel 9009 (
1728
echo.

0 commit comments

Comments
 (0)