From 8553675dba86ecefe027faacd97eceaa16aa9c11 Mon Sep 17 00:00:00 2001 From: shelvacu <1731537+shelvacu@users.noreply.github.com> Date: Tue, 31 Mar 2026 15:46:37 -0700 Subject: [PATCH] man: Fix checking manpages without a full build Some of the man pages (ex: `man/man8/zed.8`) are generated from `.in` files, and `zed.8.in` *was* a dependency of `zed.8`, but `zed.8` was not a dependency of `mancheck-...zed.8`. This usually worked anyways because a full build had already been run, now it works regardless. Reviewed-by: Brian Behlendorf Signed-off-by: Shelvacu on fw Closes #18346 --- man/Makefile.am | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/man/Makefile.am b/man/Makefile.am index 6b44cfddfaf..cf38aa70c44 100644 --- a/man/Makefile.am +++ b/man/Makefile.am @@ -131,17 +131,18 @@ SUBSTFILES += $(nodist_man_MANS) MANFILES = $(dist_noinst_man_MANS) $(dist_man_MANS) $(nodist_man_MANS) -PHONY += mancheck - mancheck_verbose = $(mancheck_verbose_@AM_V@) mancheck_verbose_ = $(mancheck_verbose_@AM_DEFAULT_V@) -mancheck_verbose_0 = @echo MANCHECK $(_MTGT); +mancheck_verbose_0 = @echo MANCHECK $<; -_MTGT = $(subst ^,/,$(subst mancheck-,,$@)) -mancheck-%: - $(mancheck_verbose)scripts/mancheck.sh $(_MTGT) +MANCHECK_TARGETS = $(foreach manfile, $(MANFILES), $(addprefix mancheck-,$(manfile))) -mancheck: $(foreach manfile, $(MANFILES), $(addprefix mancheck-,$(subst /,^,$(manfile)))) +PHONY += $(MANCHECK_TARGETS) mancheck + +$(MANCHECK_TARGETS): mancheck-%: % + $(mancheck_verbose)scripts/mancheck.sh $< + +mancheck: $(MANCHECK_TARGETS) CHECKS += mancheck