Skip to content

Commit e7d5f07

Browse files
authored
Infra: Update Makefileto match CPython/Docs and devguide (#3985)
1 parent ab9258d commit e7d5f07

File tree

1 file changed

+5
-10
lines changed

1 file changed

+5
-10
lines changed

Makefile

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,9 @@ html: venv
2828
htmlview: html
2929
$(PYTHON) -c "import os, webbrowser; webbrowser.open('file://' + os.path.realpath('build/index.html'))"
3030

31-
.PHONY: ensure-sphinx-autobuild
32-
ensure-sphinx-autobuild: venv
33-
$(call ensure_package,sphinx-autobuild)
34-
3531
## htmllive to rebuild and reload HTML files in your browser
3632
.PHONY: htmllive
37-
htmllive: SPHINXBUILD = $(VENVDIR)/bin/sphinx-autobuild
33+
htmllive: SPHINXBUILD = PATH=$(VENVDIR)/bin:$$PATH sphinx-autobuild
3834
# Arbitrarily selected ephemeral port between 49152–65535
3935
# to avoid conflicts with other processes:
4036
htmllive: SPHINXERRORHANDLING = --re-ignore="/\.idea/|/venv/|/pep-0000.rst|/topic/" --open-browser --delay 0 --port 55302
@@ -53,7 +49,7 @@ linkcheck: html
5349
## clean to remove the venv and build files
5450
.PHONY: clean
5551
clean: clean-venv
56-
-rm -rf build topic
52+
-rm -rf $(BUILDDIR)
5753

5854
## clean-venv to remove the venv
5955
.PHONY: clean-venv
@@ -89,11 +85,11 @@ _ensure-package: venv
8985

9086
.PHONY: _ensure-pre-commit
9187
_ensure-pre-commit:
92-
make _ensure-package PACKAGE=pre-commit
88+
$(MAKE) _ensure-package PACKAGE=pre-commit
9389

9490
.PHONY: _ensure-sphinx-autobuild
9591
_ensure-sphinx-autobuild:
96-
make _ensure-package PACKAGE=sphinx-autobuild
92+
$(MAKE) _ensure-package PACKAGE=sphinx-autobuild
9793

9894
## lint to lint all the files
9995
.PHONY: lint
@@ -107,8 +103,7 @@ test: venv
107103

108104
## spellcheck to check spelling
109105
.PHONY: spellcheck
110-
spellcheck: venv
111-
$(call ensure_package,pre_commit)
106+
spellcheck: _ensure-pre-commit
112107
$(VENVDIR)/bin/python3 -m pre_commit run --all-files --hook-stage manual codespell
113108

114109
.PHONY: help

0 commit comments

Comments
 (0)