Lines Matching +full:build +full:- +full:docs
10 SPHINXBUILD = PATH=$(VENVDIR)/bin:$$PATH sphinx-build
17 SPHINXERRORHANDLING = -W
20 PAPEROPT_a4 = -D latex_elements.papersize=a4paper
21 PAPEROPT_letter = -D latex_elements.papersize=letterpaper
23 ALLSPHINXOPTS = -b $(BUILDER) \
24 -d build/doctrees \
25 -j $(JOBS) \
28 . build/$(BUILDER) $(SOURCES)
33 @echo " clean to remove build files"
48 @echo " pydoc-topics to regenerate the pydoc topics file"
49 @echo " dist to create a \"dist\" directory with archived docs for download"
52 .PHONY: build
53 build: target
54 -mkdir -p build
58 @if [ -f ../Misc/NEWS ] ; then \
60 cp ../Misc/NEWS build/NEWS; \
61 elif $(BLURB) help >/dev/null 2>&1 && $(SPHINXBUILD) --version >/dev/null 2>&1; then \
62 if [ -d ../Misc/NEWS.d ]; then \
64 $(BLURB) merge -f build/NEWS; \
66 echo "Neither Misc/NEWS.d nor Misc/NEWS found; cannot build docs"; \
71 echo "Missing the required blurb or sphinx-build tools."; \
81 html: build
82 @echo "Build finished. The HTML pages are in build/html."
86 htmlhelp: build
87 @echo "Build finished; now you can run HTML Help Workshop with the" \
88 "build/htmlhelp/pydoc.hhp project file."
92 latex: build
93 @echo "Build finished; the LaTeX files are in build/latex."
94 @echo "Run \`make all-pdf' or \`make all-ps' in that directory to" \
99 text: build
100 @echo "Build finished; the text files are in build/text."
104 texinfo: build
105 @echo "Build finished; the python.texi file is in build/texinfo."
110 epub: build
111 @echo "Build finished; the epub files are in build/epub."
115 changes: build
116 @echo "The overview file is in build/changes."
121 @$(MAKE) build BUILDER=$(BUILDER) || { \
123 "or in build/$(BUILDER)/output.txt"; \
128 coverage: build
129 @echo "Coverage finished; see c.txt and python.txt in build/coverage"
134 @$(MAKE) build BUILDER=$(BUILDER) || { \
136 "results in build/doctest/output.txt"; \
139 .PHONY: pydoc-topics
140 pydoc-topics: BUILDER = pydoc-topics
141 pydoc-topics: build
143 "cp build/pydoc-topics/topics.py ../Lib/pydoc_data/topics.py"
147 gettext: override SPHINXOPTS := -d build/doctrees-gettext $(SPHINXOPTS)
148 gettext: build
152 …$(PYTHON) -c "import os, webbrowser; webbrowser.open('file://' + os.path.realpath('build/html/inde…
155 htmllive: SPHINXBUILD = PATH=$(VENVDIR)/bin:$$PATH sphinx-autobuild
156 htmllive: SPHINXOPTS = --re-ignore="/venv/" --open-browser --delay 0
157 htmllive: _ensure-sphinx-autobuild html
160 clean: clean-venv
161 -rm -rf build/*
163 .PHONY: clean-venv
164 clean-venv:
165 rm -rf $(VENVDIR)
169 @if [ -d $(VENVDIR) ] ; then \
171 echo "To recreate it, remove it first with \`make clean-venv'."; \
174 if $(UV) --version >/dev/null 2>&1; then \
176 VIRTUAL_ENV=$(VENVDIR) $(UV) pip install -r $(REQUIREMENTS); \
178 $(PYTHON) -m venv $(VENVDIR); \
179 $(VENVDIR)/bin/python3 -m pip install --upgrade pip; \
180 $(VENVDIR)/bin/python3 -m pip install -r $(REQUIREMENTS); \
185 .PHONY: dist-no-html
186 dist-no-html: dist-text dist-pdf dist-epub dist-texinfo
190 rm -rf dist
191 mkdir -p dist
192 $(MAKE) dist-html
193 $(MAKE) dist-text
194 $(MAKE) dist-pdf
195 $(MAKE) dist-epub
196 $(MAKE) dist-texinfo
198 .PHONY: dist-html
199 dist-html:
202 mkdir -p dist
203 rm -rf build/html
204 find dist -name 'python-$(DISTVERSION)-docs-html*' -exec rm -rf {} \;
206 cp -pPR build/html dist/python-$(DISTVERSION)-docs-html
207 tar -C dist -cf dist/python-$(DISTVERSION)-docs-html.tar python-$(DISTVERSION)-docs-html
208 bzip2 -9 -k dist/python-$(DISTVERSION)-docs-html.tar
209 (cd dist; zip -q -r -9 python-$(DISTVERSION)-docs-html.zip python-$(DISTVERSION)-docs-html)
210 rm -r dist/python-$(DISTVERSION)-docs-html
211 rm dist/python-$(DISTVERSION)-docs-html.tar
212 @echo "Build finished and archived!"
214 .PHONY: dist-text
215 dist-text:
216 # archive the text build
218 mkdir -p dist
219 rm -rf build/text
220 find dist -name 'python-$(DISTVERSION)-docs-text*' -exec rm -rf {} \;
222 cp -pPR build/text dist/python-$(DISTVERSION)-docs-text
223 tar -C dist -cf dist/python-$(DISTVERSION)-docs-text.tar python-$(DISTVERSION)-docs-text
224 bzip2 -9 -k dist/python-$(DISTVERSION)-docs-text.tar
225 (cd dist; zip -q -r -9 python-$(DISTVERSION)-docs-text.zip python-$(DISTVERSION)-docs-text)
226 rm -r dist/python-$(DISTVERSION)-docs-text
227 rm dist/python-$(DISTVERSION)-docs-text.tar
228 @echo "Build finished and archived!"
230 .PHONY: dist-pdf
231 dist-pdf:
234 mkdir -p dist
235 rm -rf build/latex
236 find dist -name 'python-$(DISTVERSION)-docs-pdf*' -exec rm -rf {} \;
238 # remove zip & bz2 dependency on all-pdf,
240 … to escape the $; https://www.gnu.org/software/make/manual/make.html#Basics-of-Variable-References)
241 -sed -i 's/: all-$$(FMT)/:/' build/latex/Makefile
242 …(cd build/latex; $(MAKE) clean && $(MAKE) --jobs=$$((`nproc`+1)) --output-sync LATEXMKOPTS='-quiet…
243 cp build/latex/docs-pdf.zip dist/python-$(DISTVERSION)-docs-pdf-a4.zip
244 cp build/latex/docs-pdf.tar.bz2 dist/python-$(DISTVERSION)-docs-pdf-a4.tar.bz2
245 @echo "Build finished and archived!"
247 .PHONY: dist-epub
248 dist-epub:
249 # copy the epub build
251 mkdir -p dist
252 rm -rf build/epub
253 rm -f dist/python-$(DISTVERSION)-docs.epub
255 cp -pPR build/epub/Python.epub dist/python-$(DISTVERSION)-docs.epub
256 @echo "Build finished and archived!"
258 .PHONY: dist-texinfo
259 dist-texinfo:
260 # archive the texinfo build
262 mkdir -p dist
263 rm -rf build/texinfo
264 find dist -name 'python-$(DISTVERSION)-docs-texinfo*' -exec rm -rf {} \;
266 $(MAKE) info --directory=build/texinfo
267 cp -pPR build/texinfo dist/python-$(DISTVERSION)-docs-texinfo
268 tar -C dist -cf dist/python-$(DISTVERSION)-docs-texinfo.tar python-$(DISTVERSION)-docs-texinfo
269 bzip2 -9 -k dist/python-$(DISTVERSION)-docs-texinfo.tar
270 (cd dist; zip -q -r -9 python-$(DISTVERSION)-docs-texinfo.zip python-$(DISTVERSION)-docs-texinfo)
271 rm -r dist/python-$(DISTVERSION)-docs-texinfo
272 rm dist/python-$(DISTVERSION)-docs-texinfo.tar
273 @echo "Build finished and archived!"
275 .PHONY: _ensure-package
276 _ensure-package: venv
277 if $(UV) --version >/dev/null 2>&1; then \
280 $(VENVDIR)/bin/python3 -m pip install $(PACKAGE); \
283 .PHONY: _ensure-pre-commit
284 _ensure-pre-commit:
285 $(MAKE) _ensure-package PACKAGE=pre-commit
287 .PHONY: _ensure-sphinx-autobuild
288 _ensure-sphinx-autobuild:
289 $(MAKE) _ensure-package PACKAGE=sphinx-autobuild
292 check: _ensure-pre-commit
293 $(VENVDIR)/bin/python3 -m pre_commit run --all-files
297 @echo "The serve target was removed, use htmllive instead (see gh-80510)"
299 # Targets for daily automated doc build
302 # To ensure such changes are picked up, we build the published docs with
303 # `-E` (to ignore the cached environment) and `-a` (to ignore already existing
306 # for development releases: always build
307 .PHONY: autobuild-dev
308 autobuild-dev: DISTVERSION = $(shell $(PYTHON) tools/extensions/patchlevel.py --short)
309 autobuild-dev:
310 $(MAKE) dist-no-html SPHINXOPTS='$(SPHINXOPTS) -Ea -A daily=1' DISTVERSION=$(DISTVERSION)
312 # for HTML-only rebuilds
313 .PHONY: autobuild-dev-html
314 autobuild-dev-html: DISTVERSION = $(shell $(PYTHON) tools/extensions/patchlevel.py --short)
315 autobuild-dev-html:
316 $(MAKE) dist-html SPHINXOPTS='$(SPHINXOPTS) -Ea -A daily=1' DISTVERSION=$(DISTVERSION)
318 # for stable releases: only build if not in pre-release stage (alpha, beta)
320 .PHONY: autobuild-stable
321 autobuild-stable:
326 @$(MAKE) autobuild-dev
328 .PHONY: autobuild-stable-html
329 autobuild-stable-html:
334 @$(MAKE) autobuild-dev-html