[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 3/6] Makefile, lint-man.mk: lint-man-groff-eqn: Split target from
From: |
Alejandro Colomar |
Subject: |
[PATCH 3/6] Makefile, lint-man.mk: lint-man-groff-eqn: Split target from lint-man-groff |
Date: |
Thu, 9 Mar 2023 18:58:25 +0100 |
Allow running eqn(1) separately, which allows more granular testing, and
also inspecting the output of eqn(1), which can be useful for debugging
the pages.
Signed-off-by: Alejandro Colomar <alx@kernel.org>
---
Makefile | 1 +
lib/lint-man.mk | 14 +++++++++++---
2 files changed, 12 insertions(+), 3 deletions(-)
diff --git a/Makefile b/Makefile
index 46e71faab..b5171e377 100644
--- a/Makefile
+++ b/Makefile
@@ -74,6 +74,7 @@ help:
$(info lint-man-tbl Lint man pages about '\" t' comment for
tbl(1))
$(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 )
$(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 8207860d8..928bb8c68 100644
--- a/lib/lint-man.mk
+++ b/lib/lint-man.mk
@@ -65,6 +65,7 @@ MANDOC := mandoc
_LINT_man_groff_eqn :=$(patsubst $(MANDIR)/%,$(_LINTDIR)/%.eqn,$(LINTMAN))
+_LINT_man_groff_troff :=$(patsubst $(MANDIR)/%,$(_LINTDIR)/%.troff,$(LINTMAN))
_LINT_man_groff :=$(patsubst
$(MANDIR)/%,$(_LINTDIR)/%.lint-man.groff.touch,$(LINTMAN))
_LINT_man_mandoc:=$(patsubst
$(MANDIR)/%,$(_LINTDIR)/%.lint-man.mandoc.touch,$(LINTMAN))
@@ -79,10 +80,13 @@ $(_LINT_man_groff_eqn): $(_LINTDIR)/%.eqn: $(MANDIR)/% |
$$(@D)/.
$(info LINT (tbl) $@)
$(TBL) $< >$@
-$(_LINT_man_groff): %.lint-man.groff.touch: %.eqn | $$(@D)/.
+$(_LINT_man_groff_troff): %.troff: %.eqn | $$(@D)/.
+ $(info LINT (eqn) $@)
+ $(EQN) $(EQNFLAGS) <$< >$@
+
+$(_LINT_man_groff): %.lint-man.groff.touch: %.troff | $$(@D)/.
$(info LINT (groff) $@)
- $(EQN) $(EQNFLAGS) <$< \
- | $(TROFF) $(TROFFFLAGS) \
+ $(TROFF) $(TROFFFLAGS) <$< \
| $(GROTTY) $(GROTTYFLAGS) \
| $(COL) $(COLFLAGS) \
| (! $(GREP) -n '.\{$(MANWIDTH)\}.' | $(SED) 's,^,$<:,' >&2)
@@ -129,6 +133,10 @@ $(_LINT_man_tbl): $(_LINTDIR)/%.lint-man.tbl.touch:
$(MANDIR)/% | $$(@D)/.
lint-man-groff-tbl: $(_LINT_man_groff_eqn)
@:
+.PHONY: lint-man-groff-eqn
+lint-man-groff-eqn: $(_LINT_man_groff_troff)
+ @:
+
.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 <=
- [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, 2023/03/09
- [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