Skip to content

Improve make clean to remove all generated files #1122

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 4, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions docs/sphinx/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
11 changes: 11 additions & 0 deletions docs/sphinx/make.bat
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down