diff options
author | Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> | 2021-07-28 13:40:18 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-07-28 13:40:18 (GMT) |
commit | fd2c2465d49a8bcb32eeda82d694eed48e57ba79 (patch) | |
tree | 8bf49e4a11bcfe607a554ee0253dd1ed380f2383 /Doc/Makefile | |
parent | c48720576d63f9a7de15a6e46b07262dd3d04a8d (diff) | |
download | cpython-fd2c2465d49a8bcb32eeda82d694eed48e57ba79.zip cpython-fd2c2465d49a8bcb32eeda82d694eed48e57ba79.tar.gz cpython-fd2c2465d49a8bcb32eeda82d694eed48e57ba79.tar.bz2 |
bpo-44756: in ./Doc, `make build` depends on `make html` (GH-27403) (GH-27411)
- venv rule is now conditional, and only does anything if $VENVDIR does not exist
- add rule "clean-venv"
(cherry picked from commit d22c876d5ac5fa464337d2e82654b8d87a83cb1b)
Co-authored-by: Jack DeVries <58614260+jdevries3133@users.noreply.github.com>
Diffstat (limited to 'Doc/Makefile')
-rw-r--r-- | Doc/Makefile | 21 |
1 files changed, 14 insertions, 7 deletions
diff --git a/Doc/Makefile b/Doc/Makefile index f653d70..18ca07a 100644 --- a/Doc/Makefile +++ b/Doc/Makefile @@ -45,7 +45,7 @@ help: @echo " check to run a check for frequent markup errors" @echo " serve to serve the documentation on the localhost (8000)" -build: +build: venv -mkdir -p build # Look first for a Misc/NEWS file (building from a source release tarball # or old repo) and use that, otherwise look for a Misc/NEWS.d directory @@ -137,14 +137,21 @@ pydoc-topics: build htmlview: html $(PYTHON) -c "import webbrowser; webbrowser.open('build/html/index.html')" -clean: - -rm -rf build/* $(VENVDIR)/* +clean: clean-venv + -rm -rf build/* + +clean-venv: + rm -rf $(VENVDIR) venv: - $(PYTHON) -m venv $(VENVDIR) - $(VENVDIR)/bin/python3 -m pip install -U pip setuptools - $(VENVDIR)/bin/python3 -m pip install -r requirements.txt - @echo "The venv has been created in the $(VENVDIR) directory" + @if [ -d $(VENVDIR) ] ; then \ + echo "venv already exists"; \ + else \ + $(PYTHON) -m venv $(VENVDIR); \ + $(VENVDIR)/bin/python3 -m pip install -U pip setuptools; \ + $(VENVDIR)/bin/python3 -m pip install -r requirements.txt; \ + echo "The venv has been created in the $(VENVDIR) directory"; \ + fi dist: rm -rf dist |