changeset 52905:f08d56acaef2

make: distribute `.PHONY` declaration to each target in the `doc` makefile This makes it easier to notice when the declaration is missing.
author Matt Harbison <matt_harbison@yahoo.com>
date Sun, 16 Feb 2025 23:03:13 -0500
parents cc18de9d1a71
children 2acf80e007ea
files doc/Makefile
diffstat 1 files changed, 6 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/doc/Makefile	Sun Feb 16 22:58:21 2025 -0500
+++ b/doc/Makefile	Sun Feb 16 23:03:13 2025 -0500
@@ -27,8 +27,7 @@
 
 export HGENCODING=UTF-8
 
-.PHONY: all man html install clean knownrefs
-
+.PHONY: all
 all: man html
 
 # Generate a list of hg commands and extensions.
@@ -45,6 +44,7 @@
 	mv $@.tmp $@
 
 # Build target for running runrst more easily by hand
+.PHONY: knownrefs
 knownrefs: commandlist.txt topiclist.txt extensionlist.txt
 
 BUILDFILES=commandlist.txt topiclist.txt extensionlist.txt
@@ -160,8 +160,10 @@
 # Also add the HTML index page
 HTML+=$(HTMLOUT)/index.html
 
+.PHONY: man
 man: $(MAN)
 
+.PHONY: html
 html: $(HTML)
 
 # This logic is duplicated in setup.py:hgbuilddoc()
@@ -205,6 +207,7 @@
 	$(PYTHON) runrst html --hg-individual-pages $(RSTARGS) --halt warning \
 	  --link-stylesheet --stylesheet-path style.css $(BUILDDIR)/$*.gendoc.txt $@
 
+.PHONY: install
 install: man
 	for i in $(MAN) ; do \
 	  subdir=`echo $$i | sed -n 's/^.*\.\([0-9]\)$$/man\1/p'` ; \
@@ -216,5 +219,6 @@
 # know anything about all the command/topic/extension targets and files.
 # $(HTML) only has the basic topics, so we need to delete $(HTMLOUT)/*.html and
 # other similar files "by hand" here.
+.PHONY: clean
 clean:
 	$(RM) $(MAN) $(HTML) common.txt $(SOURCES) *.gendoc.txt $(BUILDFILES) $(BUILDDIR)/*.gendoc.* $(HTMLOUT)/*.html