| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -15,9 +15,7 @@ PAPEROPT_a4 = -D latex_paper_size=a4 | |||
| 15 | 15 | PAPEROPT_letter = -D latex_paper_size=letter | |
| 16 | 16 | ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) . | |
| 17 | 17 | ||
| 18 | - .PHONY: help venv clean html dirhtml singlehtml pickle json htmlhelp qthelp \ | ||
| 19 | - devhelp epub latex latexpdf text man changes linkcheck doctest htmlview check | ||
| 20 | - | ||
| 18 | + .PHONY: help | ||
| 21 | 19 | help: | |
| 22 | 20 | @echo "Please use \`make <target>' where <target> is one of" | |
| 23 | 21 | @echo " venv to create a venv with necessary tools" | |
@@ -41,12 +39,15 @@ help: | |||
| 41 | 39 | @echo " doctest to run all doctests embedded in the documentation (if enabled)" | |
| 42 | 40 | @echo " check to run a check for frequent markup errors" | |
| 43 | 41 | ||
| 42 | + .PHONY: clean | ||
| 44 | 43 | clean: clean-venv | |
| 45 | 44 | -rm -rf $(BUILDDIR)/* | |
| 46 | 45 | ||
| 46 | + .PHONY: clean-venv | ||
| 47 | 47 | clean-venv: | |
| 48 | 48 | rm -rf $(VENVDIR) | |
| 49 | 49 | ||
| 50 | + .PHONY: venv | ||
| 50 | 51 | venv: | |
| 51 | 52 | @if [ -d $(VENVDIR) ] ; then \ | |
| 52 | 53 | echo "venv already exists."; \ | |
@@ -55,6 +56,7 @@ venv: | |||
| 55 | 56 | $(MAKE) ensure-venv; \ | |
| 56 | 57 | fi | |
| 57 | 58 | ||
| 59 | + .PHONY: ensure-venv | ||
| 58 | 60 | ensure-venv: | |
| 59 | 61 | @if [ ! -d $(VENVDIR) ] ; then \ | |
| 60 | 62 | $(PYTHON) -m venv $(VENVDIR); \ | |
@@ -63,37 +65,44 @@ ensure-venv: | |||
| 63 | 65 | echo "The venv has been created in the $(VENVDIR) directory"; \ | |
| 64 | 66 | fi | |
| 65 | 67 | ||
| 68 | + .PHONY: html | ||
| 66 | 69 | html: ensure-venv | |
| 67 | 70 | $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html | |
| 68 | 71 | @echo | |
| 69 | 72 | @echo "Build finished. The HTML pages are in $(BUILDDIR)/html." | |
| 70 | 73 | ||
| 74 | + .PHONY: dirhtml | ||
| 71 | 75 | dirhtml: ensure-venv | |
| 72 | 76 | $(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml | |
| 73 | 77 | @echo | |
| 74 | 78 | @echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml." | |
| 75 | 79 | ||
| 80 | + .PHONY: singlehtml | ||
| 76 | 81 | singlehtml: ensure-venv | |
| 77 | 82 | $(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml | |
| 78 | 83 | @echo | |
| 79 | 84 | @echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml." | |
| 80 | 85 | ||
| 86 | + .PHONY: pickle | ||
| 81 | 87 | pickle: ensure-venv | |
| 82 | 88 | $(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle | |
| 83 | 89 | @echo | |
| 84 | 90 | @echo "Build finished; now you can process the pickle files." | |
| 85 | 91 | ||
| 92 | + .PHONY: json | ||
| 86 | 93 | json: ensure-venv | |
| 87 | 94 | $(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json | |
| 88 | 95 | @echo | |
| 89 | 96 | @echo "Build finished; now you can process the JSON files." | |
| 90 | 97 | ||
| 98 | + .PHONY: htmlhelp | ||
| 91 | 99 | htmlhelp: ensure-venv | |
| 92 | 100 | $(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp | |
| 93 | 101 | @echo | |
| 94 | 102 | @echo "Build finished; now you can run HTML Help Workshop with the" \ | |
| 95 | 103 | ".hhp project file in $(BUILDDIR)/htmlhelp." | |
| 96 | 104 | ||
| 105 | + .PHONY: qthelp | ||
| 97 | 106 | qthelp: ensure-venv | |
| 98 | 107 | $(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp | |
| 99 | 108 | @echo | |
@@ -103,6 +112,7 @@ qthelp: ensure-venv | |||
| 103 | 112 | @echo "To view the help file:" | |
| 104 | 113 | @echo "# assistant -collectionFile $(BUILDDIR)/qthelp/PythonDevelopersGuide.qhc" | |
| 105 | 114 | ||
| 115 | + .PHONY: devhelp | ||
| 106 | 116 | devhelp: ensure-venv | |
| 107 | 117 | $(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp | |
| 108 | 118 | @echo | |
@@ -112,34 +122,40 @@ devhelp: ensure-venv | |||
| 112 | 122 | @echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/PythonDevelopersGuide" | |
| 113 | 123 | @echo "# devhelp" | |
| 114 | 124 | ||
| 125 | + .PHONY: epub | ||
| 115 | 126 | epub: ensure-venv | |
| 116 | 127 | $(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub | |
| 117 | 128 | @echo | |
| 118 | 129 | @echo "Build finished. The epub file is in $(BUILDDIR)/epub." | |
| 119 | 130 | ||
| 131 | + .PHONY: latex | ||
| 120 | 132 | latex: ensure-venv | |
| 121 | 133 | $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex | |
| 122 | 134 | @echo | |
| 123 | 135 | @echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex." | |
| 124 | 136 | @echo "Run \`make' in that directory to run these through (pdf)latex" \ | |
| 125 | 137 | "(use \`make latexpdf' here to do that automatically)." | |
| 126 | 138 | ||
| 139 | + .PHONY: latexpdf | ||
| 127 | 140 | latexpdf: ensure-venv | |
| 128 | 141 | $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex | |
| 129 | 142 | @echo "Running LaTeX files through pdflatex..." | |
| 130 | 143 | make -C $(BUILDDIR)/latex all-pdf | |
| 131 | 144 | @echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex." | |
| 132 | 145 | ||
| 146 | + .PHONY: text | ||
| 133 | 147 | text: ensure-venv | |
| 134 | 148 | $(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text | |
| 135 | 149 | @echo | |
| 136 | 150 | @echo "Build finished. The text files are in $(BUILDDIR)/text." | |
| 137 | 151 | ||
| 152 | + .PHONY: man | ||
| 138 | 153 | man: ensure-venv | |
| 139 | 154 | $(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man | |
| 140 | 155 | @echo | |
| 141 | 156 | @echo "Build finished. The manual pages are in $(BUILDDIR)/man." | |
| 142 | 157 | ||
| 158 | + .PHONY: changes | ||
| 143 | 159 | changes: ensure-venv | |
| 144 | 160 | $(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes | |
| 145 | 161 | @echo | |
@@ -151,18 +167,22 @@ linkcheck: ensure-venv | |||
| 151 | 167 | @echo "Link check complete; look for any errors in the above output " \ | |
| 152 | 168 | "or in $(BUILDDIR)/linkcheck/output.txt." | |
| 153 | 169 | ||
| 170 | + .PHONY: doctest | ||
| 154 | 171 | doctest: ensure-venv | |
| 155 | 172 | $(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest | |
| 156 | 173 | @echo "Testing of doctests in the sources finished, look at the " \ | |
| 157 | 174 | "results in $(BUILDDIR)/doctest/output.txt." | |
| 158 | 175 | ||
| 176 | + .PHONY: htmlview | ||
| 159 | 177 | htmlview: html | |
| 160 | 178 | $(PYTHON) -c "import os, webbrowser; webbrowser.open('file://' + os.path.realpath('_build/html/index.html'))" | |
| 161 | 179 | ||
| 180 | + .PHONY: check | ||
| 162 | 181 | check: ensure-venv | |
| 163 | 182 | # Ignore the tools and venv dirs and check that the default role is not used. | |
| 164 | 183 | $(SPHINXLINT) -i tools -i $(VENVDIR) --enable default-role | |
| 165 | 184 | ||
| 185 | + .PHONY: serve | ||
| 166 | 186 | serve: | |
| 167 | 187 | @echo "The 'serve' target was removed, use 'htmlview' instead" \ | |
| 168 | 188 | "(see https://github.com/python/cpython/issues/80510)" | |
| Back | FazBrowse Home | New Git URL |
0 commit comments