Repository navigation
Expand file tree
/
Copy pathMakefile
More file actions
59 lines (48 loc) · 2.09 KB
/
Copy pathMakefile
File metadata and controls
59 lines (48 loc) · 2.09 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
SPHINXBUILD ?= sphinx-build
PYTHON ?= python3
SOURCEDIR ?= docs
BUILDDIR ?= docs/_build
HTMLDIR ?= $(BUILDDIR)/html
SPHINXOPTS ?=
.PHONY: help docs-check html strict spelling linkcheck api-smoke api-reference rtd clean
help:
@echo "html Build the Sphinx site"
@echo "docs-check Validate generated references, navigation, CLI, style, and examples"
@echo "strict Rebuild with warnings and missing references as errors"
@echo "spelling Check documentation spelling"
@echo "linkcheck Check external links"
@echo "api-smoke Import documented APIs and inspect the CLI tree"
@echo "api-reference Check that generated PublicAPI pages match source annotations"
@echo "rtd Build into Read the Docs' requested output directory"
@echo "clean Remove only Sphinx-generated documentation output"
# The dirhtml builder keeps directory-style URLs (``quickstart/``) identical
# to the previous MkDocs site so transitional GitHub Pages links stay valid.
html:
$(SPHINXBUILD) -b dirhtml "$(SOURCEDIR)" "$(HTMLDIR)" \
-j auto $(SPHINXOPTS)
docs-check:
$(PYTHON) tools/check_docs.py --static-only
strict:
$(SPHINXBUILD) -b dirhtml -a -E -n -W --keep-going -j auto \
"$(SOURCEDIR)" "$(HTMLDIR)" $(SPHINXOPTS)
spelling:
TRIBUTO_DOCS_SKIP_INTERSPHINX=1 $(SPHINXBUILD) \
-b spelling -a -E -W --keep-going \
"$(SOURCEDIR)" "$(BUILDDIR)/spelling" $(SPHINXOPTS)
# External sites are outside the repository's control. This target still
# returns a failure for broken links; CI runs it in a separately visible,
# non-blocking job so all failures are collected without weakening strict.
linkcheck:
$(SPHINXBUILD) -b linkcheck -a -E --keep-going \
"$(SOURCEDIR)" "$(BUILDDIR)/linkcheck" $(SPHINXOPTS)
api-smoke:
$(PYTHON) tools/check_docs.py
api-reference:
$(PYTHON) tools/generate_public_api_reference.py --check
rtd: docs-check
@test -n "$(HTMLDIR)" || \
{ echo "HTMLDIR must point to the Read the Docs output directory"; exit 2; }
$(SPHINXBUILD) -b dirhtml -a -E -n -W --keep-going -j auto \
"$(SOURCEDIR)" "$(HTMLDIR)" $(SPHINXOPTS)
clean:
$(SPHINXBUILD) -M clean "$(SOURCEDIR)" "$(BUILDDIR)"