From 104851534b3c8ef7afcf607dfe4cc2c8d0f43ca7 Mon Sep 17 00:00:00 2001 From: Kevin Anderson Date: Sun, 3 Jan 2021 13:29:10 -0700 Subject: [PATCH] make clean: also delete generated, auto_examples, savefig --- docs/sphinx/Makefile | 3 +++ docs/sphinx/make.bat | 11 +++++++++++ 2 files changed, 14 insertions(+) diff --git a/docs/sphinx/Makefile b/docs/sphinx/Makefile index aedab24b80..0c96b4ed23 100644 --- a/docs/sphinx/Makefile +++ b/docs/sphinx/Makefile @@ -48,6 +48,9 @@ help: clean: rm -rf $(BUILDDIR)/* + rm -rf source/generated + rm -rf source/auto_examples + rm -rf source/savefig html: $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html diff --git a/docs/sphinx/make.bat b/docs/sphinx/make.bat index 9534b01813..d12b216553 100644 --- a/docs/sphinx/make.bat +++ b/docs/sphinx/make.bat @@ -12,6 +12,17 @@ set BUILDDIR=build if "%1" == "" goto help + +if "%1" == "clean" ( + REM override the default `make clean` behavior of sphinx-build; + REM this lets us clean out the various build files in sphinx/source/ + for /d %%i in (%BUILDDIR%\*) do rmdir /q /s %%i + rmdir /q /s %SOURCEDIR%\generated >nul 2>&1 + rmdir /q /s %SOURCEDIR%\auto_examples >nul 2>&1 + rmdir /q /s %SOURCEDIR%\savefig >nul 2>&1 + goto end +) + %SPHINXBUILD% >NUL 2>NUL if errorlevel 9009 ( echo.