Skip to content

Commit

Permalink
Trac #33705: "make doc-clean" should remove inventory, doctrees
Browse files Browse the repository at this point in the history
Followup to #29310, #33104

We could consider to extend `make doc-clean` so that it also removes
`inventory`, `doctrees`.
This should suffice to resolve incremental docbuild problems.

URL: https://trac.sagemath.org/33705
Reported by: mkoeppe
Ticket author(s): John Palmieri
Reviewer(s): Matthias Koeppe
  • Loading branch information
Release Manager committed Jul 25, 2022
2 parents 977e691 + 8244126 commit 04ad7f9
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
7 changes: 7 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,13 @@ sage_setup-clean:
build-clean: clean doc-clean sagelib-clean sage_docbuild-clean

doc-clean:
if [ -f "$(SAGE_SRC)"/bin/sage-env-config ]; then \
. "$(SAGE_SRC)"/bin/sage-env-config; \
if [ -n "$$SAGE_LOCAL" ]; then \
rm -rf "$$SAGE_LOCAL/share/doc/sage/inventory"; \
rm -rf "$$SAGE_LOCAL/share/doc/sage/doctrees"; \
fi; \
fi; \
cd "$(SAGE_SRC)/doc" && $(MAKE) clean

# Deleting src/lib is to get rid of src/lib/pkgconfig
Expand Down
7 changes: 4 additions & 3 deletions build/make/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -340,9 +340,10 @@ doc-html: sagemath_doc_html

# 'doc-html-no-plot': build docs without building the graphics coming
# from the '.. plot' directive, in case you want to save a few
# megabytes of disk space. 'doc-clean' is a prerequisite because the
# presence of graphics is cached in src/doc/output.
doc-html-no-plot: doc-clean
# megabytes of disk space. Run 'make doc-clean' first because the
# presence of graphics is cached in the built documentation.
doc-html-no-plot:
(cd $(SAGE_ROOT) && $(MAKE) doc-clean)
+$(MAKE_REC) SAGE_DOCBUILD_OPTS="$(SAGE_DOCBUILD_OPTS) --no-plot" doc-html

# Using mathjax is actually the only options, but we keep
Expand Down

0 comments on commit 04ad7f9

Please sign in to comment.