Skip to content

Commit

Permalink
Fix PHONY declaration for topic targets
Browse files Browse the repository at this point in the history
Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
  • Loading branch information
jdbaldry committed Feb 18, 2025
1 parent 7a60710 commit 5ade32e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
4 changes: 3 additions & 1 deletion docs/docs.mk
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,9 @@ update: ## Fetch the latest version of this Makefile and the `make-docs` script
curl -s -LO https://raw.githubusercontent.com/grafana/writers-toolkit/main/docs/make-docs
chmod +x make-docs

.PHONY: topic/%
# ls static/templates/ | sed 's/-template\.md//' | xargs
TOPIC_TYPES := concept multiple-tasks reference section task tutorial visualization
.PHONY: $(patsubst %,topic/%,$(TOPIC_TYPES))
topic/%: ## Create a topic from the Writers' Toolkit template. Specify the topic type as the target, for example, `make topic/task TOPIC_PATH=sources/my-new-topic.md`.
topic/%:
$(if $(TOPIC_PATH),,$(error "You must set the TOPIC_PATH variable to the path where the $(@F) topic will be created. For example: make $(@) TOPIC_PATH=sources/my-new-topic.md"))
Expand Down
6 changes: 6 additions & 0 deletions docs/make-docs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,12 @@
# [Semantic versioning](https://semver.org/) is used to help the reader identify the significance of changes.
# Changes are relevant to this script and the support docs.mk GNU Make interface.
#
# ## 8.5.1 (2025-02-18)
#
# ### Fixed
#
# - PHONY declaration for topic/<KIND> targets.
#
# ## 8.5.0 (2025-02-13)
#
# ### Added
Expand Down

0 comments on commit 5ade32e

Please sign in to comment.