[PATCH 4/6] Makefile, lint-man.mk: lint-man-groff-troff: Split target from lint-man-groff

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

 



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@xxxxxxxxxx>
---
 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




[Index of Archives]     [Kernel Documentation]     [Netdev]     [Linux Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux