From 24a531a78bdb0d66eb8286919f9480f9e90c1335 Mon Sep 17 00:00:00 2001 From: behnazh Date: Mon, 5 Jun 2023 07:33:10 +1000 Subject: [PATCH] build(docs): do not run docs Makefile target if no changes in docs/source; remove the check and test dependencies from the docs target --- Makefile | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) 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