Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 1k
Refactor Makefile to re-use targets via variables#1207
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Uh oh!
There was an error while loading. Please reload this page.
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Uh oh!
There was an error while loading. Please reload this page.
Jump to
Jump to file
Failed to load files.
Loading
Uh oh!
There was an error while loading. Please reload this page.
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -7,13 +7,17 @@ VENVDIR = ./venv | ||
| BUILDDIR = _build | ||
| SPHINXOPTS = -W --keep-going | ||
| SPHINXBUILD = $(VENVDIR)/bin/sphinx-build | ||
| BUILDER = html | ||
| SPHINXLINT = $(VENVDIR)/bin/sphinx-lint | ||
| PAPER = | ||
| # Internal variables. | ||
| PAPEROPT_a4 = -D latex_paper_size=a4 | ||
| PAPEROPT_letter = -D latex_paper_size=letter | ||
| ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) . | ||
| ALLSPHINXOPTS = -b $(BUILDER) \ | ||
| -d $(BUILDDIR)/doctrees \ | ||
| $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) \ | ||
| . $(BUILDDIR)/$(BUILDER) | ||
| .PHONY: help | ||
| help: | ||
| @@ -69,111 +73,86 @@ ensure-venv: | ||
| .PHONY: html | ||
| html: ensure-venv versions | ||
| $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html | ||
| @echo | ||
| @echo "Build finished. The HTML pages are in $(BUILDDIR)/html." | ||
| $(SPHINXBUILD) $(ALLSPHINXOPTS) | ||
| .PHONY: dirhtml | ||
| dirhtml: ensure-venv versions | ||
| $(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml | ||
| @echo | ||
| @echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml." | ||
| dirhtml: BUILDER = dirhtml | ||
| dirhtml: html | ||
| .PHONY: singlehtml | ||
| singlehtml: ensure-venv | ||
| $(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml | ||
| @echo | ||
| @echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml." | ||
| singlehtml: BUILDER = singlehtml | ||
| singlehtml: html | ||
| .PHONY: pickle | ||
| pickle: ensure-venv | ||
| $(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle | ||
| pickle: BUILDER = pickle | ||
| pickle: html | ||
| @echo | ||
| @echo "Build finished; now you can process the pickle files." | ||
| .PHONY: json | ||
| json: ensure-venv | ||
| $(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json | ||
| json: BUILDER = json | ||
| json: html | ||
| @echo | ||
| @echo "Build finished; now you can process the JSON files." | ||
| .PHONY: htmlhelp | ||
| htmlhelp: ensure-venv | ||
| $(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp | ||
| htmlhelp: BUILDER = htmlhelp | ||
| htmlhelp: html | ||
| @echo | ||
| @echo "Build finished; now you can run HTML Help Workshop with the" \ | ||
| ".hhp project file in $(BUILDDIR)/htmlhelp." | ||
| ".hhp project file in $(BUILDDIR)/$(BUILDER)." | ||
| .PHONY: qthelp | ||
| qthelp: ensure-venv | ||
| $(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp | ||
| @echo | ||
| @echo "Build finished; now you can run "qcollectiongenerator" with the" \ | ||
| ".qhcp project file in $(BUILDDIR)/qthelp, like this:" | ||
| @echo "# qcollectiongenerator $(BUILDDIR)/qthelp/PythonDevelopersGuide.qhcp" | ||
| @echo "To view the help file:" | ||
| @echo "# assistant -collectionFile $(BUILDDIR)/qthelp/PythonDevelopersGuide.qhc" | ||
| qthelp: BUILDER = qthelp | ||
| qthelp: html | ||
| .PHONY: devhelp | ||
| devhelp: ensure-venv | ||
| $(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp | ||
| @echo | ||
| @echo "Build finished." | ||
| @echo "To view the help file:" | ||
| @echo "# mkdir -p $$HOME/.local/share/devhelp/PythonDevelopersGuide" | ||
| @echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/PythonDevelopersGuide" | ||
| @echo "# devhelp" | ||
| devhelp: BUILDER = devhelp | ||
| devhelp: html | ||
| .PHONY: epub | ||
| epub: ensure-venv | ||
| $(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub | ||
| epub: BUILDER = epub | ||
| epub: html | ||
| @echo | ||
| @echo "Build finished. The epub file is in $(BUILDDIR)/epub." | ||
| @echo "Build finished. The epub file is in $(BUILDDIR)/$(BUILDER)." | ||
| .PHONY: latex | ||
| latex: ensure-venv | ||
| $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex | ||
| @echo | ||
| @echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex." | ||
| @echo "Run \`make' in that directory to run these through (pdf)latex" \ | ||
| "(use \`make latexpdf' here to do that automatically)." | ||
hugovk marked this conversation as resolved.
Uh oh!There was an error while loading. Please reload this page. | ||
| latex: BUILDER = latex | ||
| latex: html | ||
| .PHONY: latexpdf | ||
| latexpdf: ensure-venv | ||
| $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex | ||
| latexpdf: BUILDER = latex | ||
| latexpdf: html | ||
| @echo "Running LaTeX files through pdflatex..." | ||
| make -C $(BUILDDIR)/latex all-pdf | ||
| @echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex." | ||
| @echo "pdflatex finished; the PDF files are in $(BUILDDIR)/$(BUILDER)." | ||
| .PHONY: text | ||
| text: ensure-venv | ||
| $(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text | ||
| @echo | ||
| @echo "Build finished. The text files are in $(BUILDDIR)/text." | ||
| text: BUILDER = text | ||
| text: html | ||
| .PHONY: man | ||
| man: ensure-venv | ||
| $(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man | ||
| man: BUILDER = man | ||
| man: html | ||
| @echo | ||
| @echo "Build finished. The manual pages are in $(BUILDDIR)/man." | ||
| @echo "Build finished. The manual pages are in $(BUILDDIR)/$(BUILDER)." | ||
| .PHONY: changes | ||
| changes: ensure-venv | ||
| $(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes | ||
| @echo | ||
| @echo "The overview file is in $(BUILDDIR)/changes." | ||
| changes: BUILDER = changes | ||
| changes: html | ||
| linkcheck: ensure-venv | ||
| $(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck | ||
| .PHONY: linkcheck | ||
| linkcheck: BUILDER = linkcheck | ||
| linkcheck: html | ||
| @echo | ||
| @echo "Link check complete; look for any errors in the above output " \ | ||
| "or in $(BUILDDIR)/linkcheck/output.txt." | ||
| "or in $(BUILDDIR)/$(BUILDER)/output.txt." | ||
| .PHONY: doctest | ||
| doctest: ensure-venv | ||
| $(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest | ||
| doctest: BUILDER = doctest | ||
| doctest: html | ||
| @echo "Testing of doctests in the sources finished, look at the " \ | ||
| "results in $(BUILDDIR)/doctest/output.txt." | ||
| "results in $(BUILDDIR)/$(BUILDER)/output.txt." | ||
| .PHONY: htmlview | ||
| htmlview: html | ||
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.