groff
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH 5/6] Makefile, lint-man.mk: lint-man-groff-grotty: Split target f


From: Alejandro Colomar
Subject: [PATCH 5/6] Makefile, lint-man.mk: lint-man-groff-grotty: Split target from lint-man-groff
Date: Thu, 9 Mar 2023 18:58:27 +0100

Allow running grotty(1) separately, which allows more granular testing, and 
also inspecting the output of grotty(1), which can be useful for debugging the 
pages.

Signed-off-by: Alejandro Colomar <alx@kernel.org>
---
 Makefile        |  1 +
 lib/lint-man.mk | 16 ++++++++++++----
 2 files changed, 13 insertions(+), 4 deletions(-)

diff --git a/Makefile b/Makefile
index 270ee00e3..3788fb0f1 100644
--- a/Makefile
+++ b/Makefile
@@ -76,6 +76,7 @@ help:
        $(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  lint-man-groff-grotty   Lint man pages with grotty(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 bc3ce6a3d..a342eb44d 100644
--- a/lib/lint-man.mk
+++ b/lib/lint-man.mk
@@ -67,6 +67,7 @@ MANDOC              := mandoc
 _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_col    :=$(patsubst $(MANDIR)/%,$(_LINTDIR)/%.col,$(LINTMAN))
 
 _LINT_man_groff :=$(patsubst 
$(MANDIR)/%,$(_LINTDIR)/%.lint-man.groff.touch,$(LINTMAN))
 _LINT_man_mandoc:=$(patsubst 
$(MANDIR)/%,$(_LINTDIR)/%.lint-man.mandoc.touch,$(LINTMAN))
@@ -89,10 +90,13 @@ $(_LINT_man_groff_grotty): %.grotty: %.troff | $$(@D)/.
        $(info LINT (troff)     $@)
        $(TROFF) $(TROFFFLAGS) <$< >$@
 
-$(_LINT_man_groff): %.lint-man.groff.touch: %.grotty | $$(@D)/.
-       $(info LINT (groff)     $@)
-       $(GROTTY) $(GROTTYFLAGS) <$< \
-       | $(COL) $(COLFLAGS) \
+$(_LINT_man_groff_col): %.col: %.grotty | $$(@D)/.
+       $(info LINT (grotty)    $@)
+       $(GROTTY) $(GROTTYFLAGS) <$< >$@
+
+$(_LINT_man_groff): %.lint-man.groff.touch: %.col | $$(@D)/.
+       $(info LINT (col)       $@)
+       $(COL) $(COLFLAGS) <$< \
        | (! $(GREP) -n '.\{$(MANWIDTH)\}.' | $(SED) 's,^,$<:,' >&2)
        touch $@
 
@@ -145,6 +149,10 @@ lint-man-groff-eqn: $(_LINT_man_groff_troff)
 lint-man-groff-troff: $(_LINT_man_groff_grotty)
        @:
 
+.PHONY: lint-man-groff-grotty
+lint-man-groff-grotty: $(_LINT_man_groff_col)
+       @:
+
 .PHONY: $(lint_man)
 $(lint_man): lint-man-%: $$(_LINT_man_%)
        @:
-- 
2.39.2




reply via email to

[Prev in Thread] Current Thread [Next in Thread]