summaryrefslogtreecommitdiffstats
path: root/share/mk/check
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-15 19:40:15 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-15 19:40:15 +0000
commit399644e47874bff147afb19c89228901ac39340e (patch)
tree1c4c0b733f4c16b5783b41bebb19194a9ef62ad1 /share/mk/check
parentInitial commit. (diff)
downloadmanpages-399644e47874bff147afb19c89228901ac39340e.tar.xz
manpages-399644e47874bff147afb19c89228901ac39340e.zip
Adding upstream version 6.05.01.upstream/6.05.01
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'share/mk/check')
-rw-r--r--share/mk/check/_.mk18
-rw-r--r--share/mk/check/catman.mk51
2 files changed, 69 insertions, 0 deletions
diff --git a/share/mk/check/_.mk b/share/mk/check/_.mk
new file mode 100644
index 0000000..6326d1f
--- /dev/null
+++ b/share/mk/check/_.mk
@@ -0,0 +1,18 @@
+########################################################################
+# Copyright 2023, Alejandro Colomar <alx@kernel.org>
+# SPDX-License-Identifier: GPL-3.0-or-later
+########################################################################
+
+
+ifndef MAKEFILE_CHECK_INCLUDED
+MAKEFILE_CHECK_INCLUDED := 1
+
+
+check := check-catman
+
+
+.PHONY: check
+check: $(check);
+
+
+endif # include guard
diff --git a/share/mk/check/catman.mk b/share/mk/check/catman.mk
new file mode 100644
index 0000000..8a0d3b6
--- /dev/null
+++ b/share/mk/check/catman.mk
@@ -0,0 +1,51 @@
+########################################################################
+# Copyright 2021-2023, Alejandro Colomar <alx@kernel.org>
+# SPDX-License-Identifier: GPL-3.0-or-later
+########################################################################
+
+
+ifndef MAKEFILE_CHECK_CATMAN_INCLUDED
+MAKEFILE_CHECK_CATMAN_INCLUDED := 1
+
+
+include $(MAKEFILEDIR)/cmd.mk
+include $(MAKEFILEDIR)/build/_.mk
+include $(MAKEFILEDIR)/build/catman.mk
+include $(MAKEFILEDIR)/check/_.mk
+include $(MAKEFILEDIR)/src.mk
+
+
+DEFAULT_COLFLAGS := \
+ -b \
+ -p \
+ -x
+EXTRA_COLFLAGS :=
+COLFLAGS := $(DEFAULT_COLFLAGS) $(EXTRA_COLFLAGS)
+COL := col
+
+
+_CHECK_catman_grep := $(patsubst $(MANDIR)/%,$(_MANDIR)/%.cat.grep,$(NONSO_MAN) $(NONSO_MDOC))
+_CHECK_catman := $(patsubst $(MANDIR)/%,$(_MANDIR)/%.check-catman.touch,$(NONSO_MAN) $(NONSO_MDOC))
+
+
+$(_CHECK_catman_grep): %.grep: % | $$(@D)/
+ $(info COL $@)
+ $(COL) $(COLFLAGS) <$< >$@
+
+$(_CHECK_catman): %.check-catman.touch: %.cat.grep | $$(@D)/
+ $(info GREP $@)
+ ! $(GREP) -n '.\{$(MANWIDTH)\}.' $< /dev/null >&2
+ touch $@
+
+
+.PHONY: check-catman-col
+check-catman-col: $(_CHECK_catman_grep);
+
+.PHONY: check-catman-grep
+check-catman-grep: $(_CHECK_catman);
+
+.PHONY: check-catman
+check-catman: check-catman-grep;
+
+
+endif # include guard