Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
Cpython
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
sip
Cpython
Commits
969620d5
Unverified
Commit
969620d5
authored
Nov 27, 2022
by
Hugo van Kemenade
Committed by
GitHub
Nov 27, 2022
Browse files
Options
Downloads
Patches
Plain Diff
Docs: Move .PHONY to each section to avoid copy/paste omissions (#99396)
parent
2653b82c
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
Doc/Makefile
+24
-4
24 additions, 4 deletions
Doc/Makefile
with
24 additions
and
4 deletions
Doc/Makefile
+
24
−
4
View file @
969620d5
...
@@ -21,10 +21,7 @@ PAPEROPT_letter = -D latex_elements.papersize=letterpaper
...
@@ -21,10 +21,7 @@ PAPEROPT_letter = -D latex_elements.papersize=letterpaper
ALLSPHINXOPTS
=
-b
$(
BUILDER
)
-d
build/doctrees
$(
PAPEROPT_
$(
PAPER
))
-j
auto
\
ALLSPHINXOPTS
=
-b
$(
BUILDER
)
-d
build/doctrees
$(
PAPEROPT_
$(
PAPER
))
-j
auto
\
$(
SPHINXOPTS
)
$(
SPHINXERRORHANDLING
)
.
build/
$(
BUILDER
)
$(
SOURCES
)
$(
SPHINXOPTS
)
$(
SPHINXERRORHANDLING
)
.
build/
$(
BUILDER
)
$(
SOURCES
)
.PHONY
:
help build html htmlhelp latex text texinfo epub changes linkcheck
\
.PHONY
:
help
coverage doctest pydoc-topics htmlview clean clean-venv venv dist check serve
\
autobuild-dev autobuild-dev-html autobuild-stable autobuild-stable-html
help
:
help
:
@
echo
"Please use
\`
make <target>' where <target> is one of"
@
echo
"Please use
\`
make <target>' where <target> is one of"
@
echo
" clean to remove build files"
@
echo
" clean to remove build files"
...
@@ -44,6 +41,7 @@ help:
...
@@ -44,6 +41,7 @@ help:
@
echo
" dist to create a
\"
dist
\"
directory with archived docs for download"
@
echo
" dist to create a
\"
dist
\"
directory with archived docs for download"
@
echo
" check to run a check for frequent markup errors"
@
echo
" check to run a check for frequent markup errors"
.PHONY
:
build
build
:
build
:
-
mkdir
-p
build
-
mkdir
-p
build
# Look first for a Misc/NEWS file (building from a source release tarball
# Look first for a Misc/NEWS file (building from a source release tarball
...
@@ -70,38 +68,46 @@ build:
...
@@ -70,38 +68,46 @@ build:
$(SPHINXBUILD)
$(ALLSPHINXOPTS)
$(SPHINXBUILD)
$(ALLSPHINXOPTS)
@echo
@echo
.PHONY
:
html
html
:
BUILDER = html
html
:
BUILDER = html
html
:
build
html
:
build
@
echo
"Build finished. The HTML pages are in build/html."
@
echo
"Build finished. The HTML pages are in build/html."
.PHONY
:
htmlhelp
htmlhelp
:
BUILDER = htmlhelp
htmlhelp
:
BUILDER = htmlhelp
htmlhelp
:
build
htmlhelp
:
build
@
echo
"Build finished; now you can run HTML Help Workshop with the"
\
@
echo
"Build finished; now you can run HTML Help Workshop with the"
\
"build/htmlhelp/pydoc.hhp project file."
"build/htmlhelp/pydoc.hhp project file."
.PHONY
:
latex
latex
:
BUILDER = latex
latex
:
BUILDER = latex
latex
:
build
latex
:
build
@
echo
"Build finished; the LaTeX files are in build/latex."
@
echo
"Build finished; the LaTeX files are in build/latex."
@
echo
"Run
\`
make all-pdf' or
\`
make all-ps' in that directory to"
\
@
echo
"Run
\`
make all-pdf' or
\`
make all-ps' in that directory to"
\
"run these through (pdf)latex."
"run these through (pdf)latex."
.PHONY
:
text
text
:
BUILDER = text
text
:
BUILDER = text
text
:
build
text
:
build
@
echo
"Build finished; the text files are in build/text."
@
echo
"Build finished; the text files are in build/text."
.PHONY
:
texinfo
texinfo
:
BUILDER = texinfo
texinfo
:
BUILDER = texinfo
texinfo
:
build
texinfo
:
build
@
echo
"Build finished; the python.texi file is in build/texinfo."
@
echo
"Build finished; the python.texi file is in build/texinfo."
@
echo
"Run
\`
make info' in that directory to run it through makeinfo."
@
echo
"Run
\`
make info' in that directory to run it through makeinfo."
.PHONY
:
epub
epub
:
BUILDER = epub
epub
:
BUILDER = epub
epub
:
build
epub
:
build
@
echo
"Build finished; the epub files are in build/epub."
@
echo
"Build finished; the epub files are in build/epub."
.PHONY
:
changes
changes
:
BUILDER = changes
changes
:
BUILDER = changes
changes
:
build
changes
:
build
@
echo
"The overview file is in build/changes."
@
echo
"The overview file is in build/changes."
.PHONY
:
linkcheck
linkcheck
:
BUILDER = linkcheck
linkcheck
:
BUILDER = linkcheck
linkcheck
:
linkcheck
:
@$(
MAKE
)
build
BUILDER
=
$(
BUILDER
)
||
{
\
@$(
MAKE
)
build
BUILDER
=
$(
BUILDER
)
||
{
\
...
@@ -109,10 +115,12 @@ linkcheck:
...
@@ -109,10 +115,12 @@ linkcheck:
"or in build/
$(
BUILDER
)
/output.txt"
;
\
"or in build/
$(
BUILDER
)
/output.txt"
;
\
false
;
}
false
;
}
.PHONY
:
coverage
coverage
:
BUILDER = coverage
coverage
:
BUILDER = coverage
coverage
:
build
coverage
:
build
@
echo
"Coverage finished; see c.txt and python.txt in build/coverage"
@
echo
"Coverage finished; see c.txt and python.txt in build/coverage"
.PHONY
:
doctest
doctest
:
BUILDER = doctest
doctest
:
BUILDER = doctest
doctest
:
doctest
:
@$(
MAKE
)
build
BUILDER
=
$(
BUILDER
)
||
{
\
@$(
MAKE
)
build
BUILDER
=
$(
BUILDER
)
||
{
\
...
@@ -120,20 +128,25 @@ doctest:
...
@@ -120,20 +128,25 @@ doctest:
"results in build/doctest/output.txt"
;
\
"results in build/doctest/output.txt"
;
\
false
;
}
false
;
}
.PHONY
:
pydoc-topics
pydoc-topics
:
BUILDER = pydoc-topics
pydoc-topics
:
BUILDER = pydoc-topics
pydoc-topics
:
build
pydoc-topics
:
build
@
echo
"Building finished; now run this:"
\
@
echo
"Building finished; now run this:"
\
"cp build/pydoc-topics/topics.py ../Lib/pydoc_data/topics.py"
"cp build/pydoc-topics/topics.py ../Lib/pydoc_data/topics.py"
.PHONY
:
htmlview
htmlview
:
html
htmlview
:
html
$(
PYTHON
)
-c
"import os, webbrowser; webbrowser.open('file://' + os.path.realpath('build/html/index.html'))"
$(
PYTHON
)
-c
"import os, webbrowser; webbrowser.open('file://' + os.path.realpath('build/html/index.html'))"
.PHONY
:
clean
clean
:
clean-venv
clean
:
clean-venv
-
rm
-rf
build/
*
-
rm
-rf
build/
*
.PHONY
:
clean-venv
clean-venv
:
clean-venv
:
rm
-rf
$(
VENVDIR
)
rm
-rf
$(
VENVDIR
)
.PHONY
:
venv
venv
:
venv
:
@
if
[
-d
$(
VENVDIR
)
]
;
then
\
@
if
[
-d
$(
VENVDIR
)
]
;
then
\
echo
"venv already exists."
;
\
echo
"venv already exists."
;
\
...
@@ -145,6 +158,7 @@ venv:
...
@@ -145,6 +158,7 @@ venv:
echo
"The venv has been created in the
$(
VENVDIR
)
directory"
;
\
echo
"The venv has been created in the
$(
VENVDIR
)
directory"
;
\
fi
fi
.PHONY
:
dist
dist
:
dist
:
rm
-rf
dist
rm
-rf
dist
mkdir
-p
dist
mkdir
-p
dist
...
@@ -199,12 +213,14 @@ dist:
...
@@ -199,12 +213,14 @@ dist:
rm
-r
dist/python-$(DISTVERSION)-docs-texinfo
rm
-r
dist/python-$(DISTVERSION)-docs-texinfo
rm
dist/python-$(DISTVERSION)-docs-texinfo.tar
rm
dist/python-$(DISTVERSION)-docs-texinfo.tar
.PHONY
:
check
check
:
check
:
# Check the docs and NEWS files with sphinx-lint.
# Check the docs and NEWS files with sphinx-lint.
# Ignore the tools and venv dirs and check that the default role is not used.
# Ignore the tools and venv dirs and check that the default role is not used.
$(
SPHINXLINT
)
-i
tools
-i
$(
VENVDIR
)
--enable
default-role
$(
SPHINXLINT
)
-i
tools
-i
$(
VENVDIR
)
--enable
default-role
$(
SPHINXLINT
)
--enable
default-role ../Misc/NEWS.d/next/
$(
SPHINXLINT
)
--enable
default-role ../Misc/NEWS.d/next/
.PHONY
:
serve
serve
:
serve
:
@
echo
"The serve target was removed, use htmlview instead (see bpo-36329)"
@
echo
"The serve target was removed, use htmlview instead (see bpo-36329)"
...
@@ -216,15 +232,18 @@ serve:
...
@@ -216,15 +232,18 @@ serve:
# output files)
# output files)
# for development releases: always build
# for development releases: always build
.PHONY
:
autobuild-dev
autobuild-dev
:
autobuild-dev
:
make dist
SPHINXOPTS
=
'
$(
SPHINXOPTS
)
-Ea -A daily=1'
make dist
SPHINXOPTS
=
'
$(
SPHINXOPTS
)
-Ea -A daily=1'
# for quick rebuilds (HTML only)
# for quick rebuilds (HTML only)
.PHONY
:
autobuild-dev-html
autobuild-dev-html
:
autobuild-dev-html
:
make html
SPHINXOPTS
=
'
$(
SPHINXOPTS
)
-Ea -A daily=1'
make html
SPHINXOPTS
=
'
$(
SPHINXOPTS
)
-Ea -A daily=1'
# for stable releases: only build if not in pre-release stage (alpha, beta)
# for stable releases: only build if not in pre-release stage (alpha, beta)
# release candidate downloads are okay, since the stable tree can be in that stage
# release candidate downloads are okay, since the stable tree can be in that stage
.PHONY
:
autobuild-stable
autobuild-stable
:
autobuild-stable
:
@
case
$(
DISTVERSION
)
in
*
[
ab]
*
)
\
@
case
$(
DISTVERSION
)
in
*
[
ab]
*
)
\
echo
"Not building;
$(
DISTVERSION
)
is not a release version."
;
\
echo
"Not building;
$(
DISTVERSION
)
is not a release version."
;
\
...
@@ -232,6 +251,7 @@ autobuild-stable:
...
@@ -232,6 +251,7 @@ autobuild-stable:
esac
esac
@
make autobuild-dev
@
make autobuild-dev
.PHONY
:
autobuild-stable-html
autobuild-stable-html
:
autobuild-stable-html
:
@
case
$(
DISTVERSION
)
in
*
[
ab]
*
)
\
@
case
$(
DISTVERSION
)
in
*
[
ab]
*
)
\
echo
"Not building;
$(
DISTVERSION
)
is not a release version."
;
\
echo
"Not building;
$(
DISTVERSION
)
is not a release version."
;
\
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment