diff --git a/Makefile b/Makefile index d1d306f9..e5ca2180 100644 --- a/Makefile +++ b/Makefile @@ -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