Skip to content
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

build(docs): do not run docs Makefile target if no changes in docs/source; remove the check and test dependencies from the docs target #560

Merged
merged 1 commit into from
Jul 22, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 7 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -188,21 +188,24 @@ dist/$(PACKAGE_NAME)-$(PACKAGE_VERSION)-build-epoch.txt:
echo $(SOURCE_DATE_EPOCH) > dist/$(PACKAGE_NAME)-$(PACKAGE_VERSION)-build-epoch.txt

# Build the HTML and Markdown documentation from the package's source.
DOCS_SOURCE := $(shell git ls-files docs/source)
.PHONY: docs docs-html docs-md
docs: docs-html docs-md
docs-html: docs/_build/html/index.html
docs/_build/html/index.html: check test
jenstroeger marked this conversation as resolved.
Show resolved Hide resolved
docs-html: docs/_build/.html-built-on
docs/_build/.html-built-on: $(DOCS_SOURCE)
if [ ! -d docs/source/_static ]; then \
mkdir docs/source/_static/; \
fi
$(MAKE) -C docs/ html
docs-md: docs/_build/markdown/Home.md
docs/_build/markdown/Home.md: check test
echo "Automatically generated by Python Package Makefile on $$(date '+%Y-%m-%d %H:%M:%S %z')." > docs/_build/.html-built-on
docs-md: docs/_build/.markdown-built-on
docs/_build/.markdown-built-on: $(DOCS_SOURCE)
if [ ! -d docs/source/_static ]; then \
mkdir docs/source/_static/; \
fi
$(MAKE) -C docs/ markdown
mv docs/_build/markdown/index.md docs/_build/markdown/Home.md
echo "Automatically generated by Python Package Makefile on $$(date '+%Y-%m-%d %H:%M:%S %z')." > docs/_build/.markdown-built-on

# Prune the packages currently installed in the virtual environment down to the required
# packages only. Pruning works in a roundabout way, where we first generate the wheels for
Expand Down