]> git.ipfire.org Git - thirdparty/man-pages.git/commitdiff
lint-man.mk: lint-man-mandoc: Silence warnings about the date
authorAlejandro Colomar <alx@kernel.org>
Wed, 9 Nov 2022 23:03:27 +0000 (00:03 +0100)
committerAlejandro Colomar <alx@kernel.org>
Wed, 9 Nov 2022 23:36:12 +0000 (00:36 +0100)
Yes, mandoc(1), I know the date is not a date, it's a placeholder to be
filled at 'make dist' time.  Let's be friends :)

Signed-off-by: Alejandro Colomar <alx@kernel.org>
lib/lint-man.mk

index 1fc3435608411538a6cc373e2a105599cec11691..b6b427031638c022878f379a84ec6b1a5c12cb2d 100644 (file)
@@ -84,7 +84,11 @@ $(_LINT_man_groff): $(_LINTDIR)/%.lint-man.groff.touch: $(MANDIR)/% | $$(@D)/.
 
 $(_LINT_man_mandoc): $(_LINTDIR)/%.lint-man.mandoc.touch: $(MANDIR)/% | $$(@D)/.
        $(info LINT (mandoc)    $@)
-       $(MANDOC) $(MANDOCFLAGS) $<
+       ! ($(MANDOC) $(MANDOCFLAGS) $< 2>&1 \
+          | $(GREP) -v 'WARNING: cannot parse date, using it verbatim: TH (date)' \
+          ||:; \
+       ) \
+       | $(GREP) '.' >&2
        touch $@