[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 4/6] Makefile, lint-man.mk: lint-man-groff-troff: Split target fr
From: |
Alejandro Colomar |
Subject: |
[PATCH 4/6] Makefile, lint-man.mk: lint-man-groff-troff: Split target from lint-man-groff |
Date: |
Thu, 9 Mar 2023 18:58:26 +0100 |
Allow running troff(1) separately, which allows more granular testing,
and also inspecting the output of troff(1), which can be useful for
debugging the pages.
Signed-off-by: Alejandro Colomar <alx@kernel.org>
---
Makefile | 1 +
lib/lint-man.mk | 18 +++++++++++++-----
2 files changed, 14 insertions(+), 5 deletions(-)
diff --git a/Makefile b/Makefile
index b5171e377..270ee00e3 100644
--- a/Makefile
+++ b/Makefile
@@ -75,6 +75,7 @@ help:
$(info lint-man-groff Lint man pages with groff(1))
$(info lint-man-groff-tbl Lint man pages with tbl(1))
$(info lint-man-groff-eqn Lint man pages with eqn(1))
+ $(info lint-man-groff-troff Lint man pages with troff(1))
$(info )
$(info [un]install Alias for "[un]install-man")
$(info [un]install-man Wrapper for [un]install-man* targets)
diff --git a/lib/lint-man.mk b/lib/lint-man.mk
index 928bb8c68..bc3ce6a3d 100644
--- a/lib/lint-man.mk
+++ b/lib/lint-man.mk
@@ -64,8 +64,9 @@ MANDOCFLAGS := $(DEFAULT_MANDOCFLAGS)
$(EXTRA_MANDOCFLAGS)
MANDOC := mandoc
-_LINT_man_groff_eqn :=$(patsubst $(MANDIR)/%,$(_LINTDIR)/%.eqn,$(LINTMAN))
-_LINT_man_groff_troff :=$(patsubst $(MANDIR)/%,$(_LINTDIR)/%.troff,$(LINTMAN))
+_LINT_man_groff_eqn :=$(patsubst $(MANDIR)/%,$(_LINTDIR)/%.eqn,$(LINTMAN))
+_LINT_man_groff_troff :=$(patsubst $(MANDIR)/%,$(_LINTDIR)/%.troff,$(LINTMAN))
+_LINT_man_groff_grotty :=$(patsubst
$(MANDIR)/%,$(_LINTDIR)/%.grotty,$(LINTMAN))
_LINT_man_groff :=$(patsubst
$(MANDIR)/%,$(_LINTDIR)/%.lint-man.groff.touch,$(LINTMAN))
_LINT_man_mandoc:=$(patsubst
$(MANDIR)/%,$(_LINTDIR)/%.lint-man.mandoc.touch,$(LINTMAN))
@@ -84,10 +85,13 @@ $(_LINT_man_groff_troff): %.troff: %.eqn | $$(@D)/.
$(info LINT (eqn) $@)
$(EQN) $(EQNFLAGS) <$< >$@
-$(_LINT_man_groff): %.lint-man.groff.touch: %.troff | $$(@D)/.
+$(_LINT_man_groff_grotty): %.grotty: %.troff | $$(@D)/.
+ $(info LINT (troff) $@)
+ $(TROFF) $(TROFFFLAGS) <$< >$@
+
+$(_LINT_man_groff): %.lint-man.groff.touch: %.grotty | $$(@D)/.
$(info LINT (groff) $@)
- $(TROFF) $(TROFFFLAGS) <$< \
- | $(GROTTY) $(GROTTYFLAGS) \
+ $(GROTTY) $(GROTTYFLAGS) <$< \
| $(COL) $(COLFLAGS) \
| (! $(GREP) -n '.\{$(MANWIDTH)\}.' | $(SED) 's,^,$<:,' >&2)
touch $@
@@ -137,6 +141,10 @@ lint-man-groff-tbl: $(_LINT_man_groff_eqn)
lint-man-groff-eqn: $(_LINT_man_groff_troff)
@:
+.PHONY: lint-man-groff-troff
+lint-man-groff-troff: $(_LINT_man_groff_grotty)
+ @:
+
.PHONY: $(lint_man)
$(lint_man): lint-man-%: $$(_LINT_man_%)
@:
--
2.39.2
- [PATCH 0/6] Moar granular linting of manual pages, Alejandro Colomar, 2023/03/09
- [PATCH 3/6] Makefile, lint-man.mk: lint-man-groff-eqn: Split target from lint-man-groff, Alejandro Colomar, 2023/03/09
- [PATCH 1/6] lint-man.mk: make-lint-tbl: ffix, Alejandro Colomar, 2023/03/09
- [PATCH 2/6] Makefile, lint-man.mk: lint-man-groff-tbl: Split target from lint-man-groff, Alejandro Colomar, 2023/03/09
- [PATCH 4/6] Makefile, lint-man.mk: lint-man-groff-troff: Split target from lint-man-groff,
Alejandro Colomar <=
- [PATCH 6/6] Makefile, lint-man.mk: lint-man-groff-col, lint-man-groff-grep: Split targets from lint-man-groff, Alejandro Colomar, 2023/03/09
- [PATCH 5/6] Makefile, lint-man.mk: lint-man-groff-grotty: Split target from lint-man-groff, Alejandro Colomar, 2023/03/09