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 <behlendorf1@llnl.gov>
Signed-off-by: Shelvacu on fw <git@shelvacu.com>
Closes #18346
This commit is contained in:
shelvacu
2026-03-31 15:46:37 -07:00
committed by GitHub
parent 67ec68fd0d
commit 8553675dba
+8 -7
View File
@@ -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