diff --git a/src/doc/Makefile b/src/doc/Makefile
index 62fb1cafd1..464c6817cd 100644
--- a/src/doc/Makefile
+++ b/src/doc/Makefile
@@ -24,31 +24,26 @@ doc-src:
 
 # Matches doc-inventory--reference-manifolds etc.
 doc-inventory--%:
-	sage --docbuild --no-pdf-links $(subst -,/,$(subst doc-inventory--,,$@)) inventory $(SAGE_DOCBUILD_OPTS)
+	python -m sage_docbuild --no-pdf-links $(subst -,/,$(subst doc-inventory--,,$@)) inventory $(SAGE_DOCBUILD_OPTS)
 
 # Matches doc-html--developer, doc-html--reference-manifolds etc.
 doc-html--%:
-	sage --docbuild --no-pdf-links $(subst -,/,$(subst doc-html--,,$@)) html $(SAGE_DOCBUILD_OPTS)
+	python -m sage_docbuild --no-pdf-links $(subst -,/,$(subst doc-html--,,$@)) html $(SAGE_DOCBUILD_OPTS)
 
 # reference manual, inventory
-ifndef SAGE_ROOT
-doc-inventory-reference:
-	$(error SAGE_ROOT undefined. This Makefile needs to be invoked by build/make/install)
-else
 doc-inventory-reference: doc-src
-	$(eval DOCS = $(shell sage --docbuild --all-documents reference))
-	@if [ -z "$(DOCS)" ]; then echo "Error: 'sage --docbuild --all-documents' failed"; exit 1; fi
+	$(eval DOCS = $(shell python -m sage_docbuild --all-documents reference))
+	@if [ -z "$(DOCS)" ]; then echo "Error: 'python -m sage_docbuild --all-documents' failed"; exit 1; fi
 	$(eval BIBLIO = $(firstword $(DOCS)))
 	$(eval OTHER_DOCS = $(wordlist 2, 100, $(DOCS)))
 	$(MAKE) doc-inventory--$(subst /,-,$(BIBLIO))
 	$(MAKE) SAGE_DOCBUILD_OPTS="$(SAGE_DOCBUILD_OPTS) --no-prune-empty-dirs" $(foreach doc, $(OTHER_DOCS), doc-inventory--$(subst /,-,$(doc)))
 	$(MAKE) SAGE_DOCBUILD_OPTS="$(SAGE_DOCBUILD_OPTS) --no-prune-empty-dirs" doc-inventory--reference_top
-endif
 
 # reference manual, html
 doc-html-reference: doc-inventory-reference
-	$(eval DOCS = $(shell sage --docbuild --all-documents reference))
-	@if [ -z "$(DOCS)" ]; then echo "Error: 'sage --docbuild --all-documents' failed"; exit 1; fi
+	$(eval DOCS = $(shell python -m sage_docbuild --all-documents reference))
+	@if [ -z "$(DOCS)" ]; then echo "Error: 'python -m sage_docbuild --all-documents' failed"; exit 1; fi
 	$(eval BIBLIO = $(firstword $(DOCS)))
 	$(eval OTHER_DOCS = $(wordlist 2, 100, $(DOCS)))
 	$(MAKE) SAGE_DOCBUILD_OPTS="$(SAGE_DOCBUILD_OPTS) --no-prune-empty-dirs" doc-html--$(subst /,-,$(BIBLIO))
@@ -57,20 +52,20 @@ doc-html-reference: doc-inventory-reference
 
 # other documentation, html
 doc-html-other: doc-html-reference
-	$(eval DOCS = $(shell sage --docbuild --all-documents all))
-	@if [ -z "$(DOCS)" ]; then echo "Error: 'sage --docbuild --all-documents' failed"; exit 1; fi
+	$(eval DOCS = $(shell python -m sage_docbuild --all-documents all))
+	@if [ -z "$(DOCS)" ]; then echo "Error: 'python -m sage_docbuild --all-documents' failed"; exit 1; fi
 	$(MAKE) SAGE_DOCBUILD_OPTS="$(SAGE_DOCBUILD_OPTS) --no-prune-empty-dirs" $(foreach doc, $(wordlist 2, 100, $(DOCS)), doc-html--$(subst /,-,$(doc)))
 
 doc-html: doc-html-reference doc-html-other
 
 # Matches doc-pdf--developer, doc-pdf--reference-manifolds etc.
 doc-pdf--%:
-	sage --docbuild $(subst -,/,$(subst doc-pdf--,,$@)) pdf $(SAGE_DOCBUILD_OPTS)
+	MAKE=$(MAKE) python -m sage_docbuild $(subst -,/,$(subst doc-pdf--,,$@)) pdf $(SAGE_DOCBUILD_OPTS)
 
 # reference manual, pdf
-doc-pdf-reference: doc-inventory-reference
-	$(eval DOCS = $(shell sage --docbuild --all-documents reference))
-	@if [ -z "$(DOCS)" ]; then echo "Error: 'sage --docbuild --all-documents' failed"; exit 1; fi
+doc-pdf-reference:
+	$(eval DOCS = $(shell python -m sage_docbuild --all-documents reference))
+	@if [ -z "$(DOCS)" ]; then echo "Error: 'python -m sage_docbuild --all-documents' failed"; exit 1; fi
 	$(eval BIBLIO = $(firstword $(DOCS)))
 	$(eval OTHER_DOCS = $(wordlist 2, 100, $(DOCS)))
 	$(MAKE) SAGE_DOCBUILD_OPTS="$(SAGE_DOCBUILD_OPTS) --no-prune-empty-dirs" doc-pdf--$(subst /,-,$(BIBLIO))
@@ -78,14 +73,14 @@ doc-pdf-reference: doc-inventory-reference
 	$(MAKE) SAGE_DOCBUILD_OPTS="$(SAGE_DOCBUILD_OPTS) --no-prune-empty-dirs" doc-pdf--reference_top
 
 # other documentation, pdf
-doc-pdf-other: doc-html-reference
-	$(eval DOCS = $(shell sage --docbuild --all-documents all))
-	@if [ -z "$(DOCS)" ]; then echo "Error: 'sage --docbuild --all-documents' failed"; exit 1; fi
+doc-pdf-other:
+	$(eval DOCS = $(shell python -m sage_docbuild --all-documents all))
+	@if [ -z "$(DOCS)" ]; then echo "Error: 'python -m sage_docbuild --all-documents' failed"; exit 1; fi
 	$(MAKE) SAGE_DOCBUILD_OPTS="$(SAGE_DOCBUILD_OPTS) --no-prune-empty-dirs" $(foreach doc, $(wordlist 2, 100, $(DOCS)), doc-pdf--$(subst /,-,$(doc)))
 
 # website with pdf links
 doc-pdf-website:
-	sage --docbuild website html $(SAGE_DOCBUILD_OPTS)
+	python -m sage_docbuild website html $(SAGE_DOCBUILD_OPTS)
 
 doc-pdf: doc-pdf-reference doc-pdf-other doc-pdf-website
 
