summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlex Colomar <alx.manpages@gmail.com>2022-09-15 21:58:13 +0200
committerAlex Colomar <alx.manpages@gmail.com>2022-09-15 21:58:18 +0200
commit52538809c80341c25507226be0547becf361af28 (patch)
treec866dd6c59963beaed6793cdd11999d26434c9a1
parent7ffb8e37b7ed1b6275edbeeaebdee43fbd0cfc88 (diff)
lint-man.mk: Support both UTF8 and non-UTF8 systems
Systems using the C locale can now also run 'make lint', and will test the ascii device. Signed-off-by: Alex Colomar <alx.manpages@gmail.com>
-rw-r--r--lib/lint-man.mk5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/lint-man.mk b/lib/lint-man.mk
index d23114209..b9dec5efd 100644
--- a/lib/lint-man.mk
+++ b/lib/lint-man.mk
@@ -18,7 +18,10 @@ TMACDIR := $(SYSCONFDIR)/groff/tmac
MANWIDTH ?= 80
TROFF_LINE_LENGTH := $(shell echo $(MANWIDTH)-2 | $(BC))
-TROFF_OUT_DEVICE := utf8
+TROFF_OUT_DEVICE := $(shell locale charmap \
+ | grep -i 'utf-*8' >/dev/null \
+ && echo utf8 \
+ || echo ascii)
TBL := tbl