Skip to content

Commit

Permalink
build(docs): do not run docs Makefile target if no changes in docs/so…
Browse files Browse the repository at this point in the history
…urce; remove the check and test dependencies from the docs target (#560)
  • Loading branch information
behnazh authored Jul 22, 2023
1 parent 7e97530 commit 43c78b7
Showing 1 changed file with 7 additions and 4 deletions.
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
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

0 comments on commit 43c78b7

Please sign in to comment.