summaryrefslogtreecommitdiffstats
path: root/share
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-24 04:52:24 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-24 04:52:24 +0000
commit100d1b33f088fd38f69129afff7f9c2a1e084a57 (patch)
tree5bf6b0bb14f22ecf0a5e9439fdd4c4758402400c /share
parentReleasing progress-linux version 6.7-2~progress7.99u1. (diff)
downloadmanpages-100d1b33f088fd38f69129afff7f9c2a1e084a57.tar.xz
manpages-100d1b33f088fd38f69129afff7f9c2a1e084a57.zip
Merging upstream version 6.8.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'share')
-rw-r--r--share/mk/build/_.mk4
-rw-r--r--share/mk/build/book.mk42
-rw-r--r--share/mk/build/catman/eqn.mk5
-rw-r--r--share/mk/build/catman/grotty.mk4
-rw-r--r--share/mk/build/catman/troff.mk22
-rw-r--r--share/mk/build/examples/_.mk19
-rw-r--r--share/mk/build/examples/cc.mk14
-rw-r--r--share/mk/build/examples/dir.mk27
-rw-r--r--share/mk/build/examples/ld.mk12
-rw-r--r--share/mk/build/examples/src.mk29
-rw-r--r--share/mk/build/fonts/_.mk19
-rw-r--r--share/mk/build/fonts/devpdf/download1
-rw-r--r--share/mk/build/fonts/download.mk26
-rw-r--r--share/mk/build/fonts/tinos/_.mk20
-rw-r--r--share/mk/build/fonts/tinos/afm.mk22
-rw-r--r--share/mk/build/fonts/tinos/dit.mk22
-rw-r--r--share/mk/build/fonts/tinos/pfa.mk22
-rw-r--r--share/mk/build/html/post-grohtml.mk4
-rw-r--r--share/mk/build/html/troff.mk14
-rw-r--r--share/mk/build/man/_.mk21
-rw-r--r--share/mk/build/man/man.mk32
-rw-r--r--share/mk/build/man/mdoc.mk27
-rw-r--r--share/mk/build/man/so.mk27
-rw-r--r--share/mk/build/pdf/_.mk2
-rw-r--r--share/mk/build/pdf/book/_.mk51
-rw-r--r--share/mk/build/pdf/book/front.roff33
-rwxr-xr-xshare/mk/build/pdf/book/prepare.pl252
-rw-r--r--share/mk/build/pdf/gropdf.mk25
-rw-r--r--share/mk/build/pdf/pages/_.mk13
-rw-r--r--share/mk/build/pdf/pages/eqn.mk (renamed from share/mk/build/pdf/eqn.mk)12
-rw-r--r--share/mk/build/pdf/pages/gropdf.mk25
-rw-r--r--share/mk/build/pdf/pages/troff.mk (renamed from share/mk/build/pdf/troff.mk)30
-rw-r--r--share/mk/build/pre/preconv.mk11
-rw-r--r--share/mk/build/pre/tbl.mk2
-rw-r--r--share/mk/build/ps/eqn.mk4
-rw-r--r--share/mk/build/ps/grops.mk4
-rw-r--r--share/mk/build/ps/troff.mk14
-rw-r--r--share/mk/check/catman/col.mk4
-rw-r--r--share/mk/check/catman/grep.mk8
-rw-r--r--share/mk/clean.mk4
-rw-r--r--share/mk/configure/build-depends/binutils/ld.mk (renamed from share/mk/configure/build-depends/ld.mk)13
-rw-r--r--share/mk/configure/build-depends/bsdextrautils/col.mk (renamed from share/mk/configure/build-depends/bsdextrautils.mk)4
-rw-r--r--share/mk/configure/build-depends/bzip2/bzip2.mk (renamed from share/mk/configure/build-depends/bzip2.mk)4
-rw-r--r--share/mk/configure/build-depends/checkpatch/checkpatch.mk (renamed from share/mk/configure/build-depends/checkpatch.mk)6
-rw-r--r--share/mk/configure/build-depends/clang-tidy/clang-tidy.mk (renamed from share/mk/configure/build-depends/clang-tidy.mk)6
-rw-r--r--share/mk/configure/build-depends/clang/clang.mk (renamed from share/mk/configure/build-depends/clang.mk)6
-rw-r--r--share/mk/configure/build-depends/coreutils.mk32
-rw-r--r--share/mk/configure/build-depends/coreutils/cat.mk (renamed from share/mk/configure/build-depends/findutils.mk)7
-rw-r--r--share/mk/configure/build-depends/coreutils/cp.mk12
-rw-r--r--share/mk/configure/build-depends/coreutils/echo.mk12
-rw-r--r--share/mk/configure/build-depends/coreutils/expr.mk12
-rw-r--r--share/mk/configure/build-depends/coreutils/head.mk12
-rw-r--r--share/mk/configure/build-depends/coreutils/install.mk16
-rw-r--r--share/mk/configure/build-depends/coreutils/ln.mk12
-rw-r--r--share/mk/configure/build-depends/coreutils/mkdir.mk12
-rw-r--r--share/mk/configure/build-depends/coreutils/realpath.mk12
-rw-r--r--share/mk/configure/build-depends/coreutils/rm.mk12
-rw-r--r--share/mk/configure/build-depends/coreutils/sort.mk12
-rw-r--r--share/mk/configure/build-depends/coreutils/stat.mk12
-rw-r--r--share/mk/configure/build-depends/coreutils/tac.mk12
-rw-r--r--share/mk/configure/build-depends/coreutils/tail.mk12
-rw-r--r--share/mk/configure/build-depends/coreutils/test.mk12
-rw-r--r--share/mk/configure/build-depends/coreutils/touch.mk12
-rw-r--r--share/mk/configure/build-depends/coreutils/true.mk12
-rw-r--r--share/mk/configure/build-depends/cpp/cpp.mk (renamed from share/mk/configure/build-depends/cpp.mk)8
-rw-r--r--share/mk/configure/build-depends/cppcheck/cppcheck.mk (renamed from share/mk/configure/build-depends/cppcheck.mk)7
-rw-r--r--share/mk/configure/build-depends/cpplint/cpplint.mk (renamed from share/mk/configure/build-depends/cpplint.mk)6
-rw-r--r--share/mk/configure/build-depends/diffoscope/diffoscope.mk (renamed from share/mk/configure/build-depends/diffoscope.mk)4
-rw-r--r--share/mk/configure/build-depends/findutils/find.mk12
-rw-r--r--share/mk/configure/build-depends/findutils/xargs.mk12
-rw-r--r--share/mk/configure/build-depends/fontforge/fontforge.mk15
-rw-r--r--share/mk/configure/build-depends/gcc/cc.mk (renamed from share/mk/configure/build-depends/cc.mk)12
-rw-r--r--share/mk/configure/build-depends/git/git.mk (renamed from share/mk/configure/build-depends/git.mk)4
-rw-r--r--share/mk/configure/build-depends/grep/grep.mk (renamed from share/mk/configure/build-depends/grep.mk)4
-rw-r--r--share/mk/configure/build-depends/groff-base.mk72
-rw-r--r--share/mk/configure/build-depends/groff-base/eqn.mk15
-rw-r--r--share/mk/configure/build-depends/groff-base/grops.mk15
-rw-r--r--share/mk/configure/build-depends/groff-base/grotty.mk15
-rw-r--r--share/mk/configure/build-depends/groff-base/nroff.mk35
-rw-r--r--share/mk/configure/build-depends/groff-base/pic.mk15
-rw-r--r--share/mk/configure/build-depends/groff-base/preconv.mk15
-rw-r--r--share/mk/configure/build-depends/groff-base/tbl.mk12
-rw-r--r--share/mk/configure/build-depends/groff-base/troff.mk17
-rw-r--r--share/mk/configure/build-depends/groff/afmtodit.mk19
-rw-r--r--share/mk/configure/build-depends/groff/gropdf.mk15
-rw-r--r--share/mk/configure/build-depends/groff/pfbtops.mk15
-rw-r--r--share/mk/configure/build-depends/groff/post-grohtml.mk (renamed from share/mk/configure/build-depends/groff.mk)10
-rw-r--r--share/mk/configure/build-depends/gzip/gzip.mk (renamed from share/mk/configure/build-depends/gzip.mk)4
-rw-r--r--share/mk/configure/build-depends/iwyu/iwyu.mk (renamed from share/mk/configure/build-depends/iwyu.mk)4
-rw-r--r--share/mk/configure/build-depends/libc-bin/locale.mk (renamed from share/mk/configure/build-depends/libc-bin.mk)4
-rw-r--r--share/mk/configure/build-depends/lzip/lzip.mk (renamed from share/mk/configure/build-depends/lzip.mk)4
-rw-r--r--share/mk/configure/build-depends/man/man.mk (renamed from share/mk/configure/build-depends/man.mk)4
-rw-r--r--share/mk/configure/build-depends/mandoc/mandoc.mk (renamed from share/mk/configure/build-depends/mandoc.mk)4
-rw-r--r--share/mk/configure/build-depends/moreutils/sponge.mk (renamed from share/mk/configure/build-depends/moreutils.mk)4
-rw-r--r--share/mk/configure/build-depends/pkgconf/pkgconf.mk (renamed from share/mk/configure/build-depends/pkgconf.mk)8
-rw-r--r--share/mk/configure/build-depends/sed/sed.mk (renamed from share/mk/configure/build-depends/sed.mk)4
-rw-r--r--share/mk/configure/build-depends/tar/tar.mk (renamed from share/mk/configure/build-depends/tar.mk)4
-rw-r--r--share/mk/configure/build-depends/texlive-fonts-extra-links/Tinos-Regular.ttf.mk12
-rw-r--r--share/mk/configure/build-depends/texlive-fonts-extra/Tinos.pfb.mk12
-rw-r--r--share/mk/configure/build-depends/xz-utils/xz.mk (renamed from share/mk/configure/build-depends/xz-utils.mk)4
-rw-r--r--share/mk/configure/directory_variables/build.mk12
-rw-r--r--share/mk/configure/directory_variables/install.mk (renamed from share/mk/configure/directory_variables.mk)12
-rw-r--r--share/mk/configure/directory_variables/src.mk20
-rw-r--r--share/mk/configure/man/link_pages.mk (renamed from share/mk/configure/link_pages.mk)4
-rw-r--r--share/mk/configure/src.mk16
-rw-r--r--share/mk/configure/version.mk27
-rw-r--r--share/mk/configure/z.mk21
-rw-r--r--share/mk/dist/_.mk4
-rw-r--r--share/mk/dist/check/_.mk11
-rw-r--r--share/mk/dist/check/diffoscope.mk6
-rw-r--r--share/mk/dist/check/dist.mk1
-rw-r--r--share/mk/dist/check/tar.mk6
-rw-r--r--share/mk/dist/files.mk31
-rw-r--r--share/mk/dist/tar.mk9
-rw-r--r--share/mk/dist/z.mk10
-rw-r--r--share/mk/install/_.mk3
-rw-r--r--share/mk/install/html.mk8
-rw-r--r--share/mk/install/man.mk64
-rw-r--r--share/mk/install/pdf/_.mk16
-rw-r--r--share/mk/install/pdf/book.mk33
-rw-r--r--share/mk/lint/c/checkpatch.mk17
-rw-r--r--share/mk/lint/c/clang-tidy.mk325
-rw-r--r--share/mk/lint/c/cppcheck.mk99
-rw-r--r--share/mk/lint/c/cpplint.mk13
-rw-r--r--share/mk/lint/c/iwyu.mk160
-rw-r--r--share/mk/lint/man/mandoc.ignore.grep1
-rw-r--r--share/mk/lint/man/mandoc.mk16
-rw-r--r--share/mk/lint/man/tbl.mk48
-rw-r--r--share/mk/lint/mdoc/_.mk20
-rw-r--r--share/mk/lint/mdoc/mandoc.mk20
-rw-r--r--share/mk/src/man.mk (renamed from share/mk/src.mk)25
-rw-r--r--share/mk/src/sortman.mk12
132 files changed, 1832 insertions, 867 deletions
diff --git a/share/mk/build/_.mk b/share/mk/build/_.mk
index 8ced940..9bdcbd6 100644
--- a/share/mk/build/_.mk
+++ b/share/mk/build/_.mk
@@ -6,7 +6,7 @@ ifndef MAKEFILE_BUILD_INCLUDED
MAKEFILE_BUILD_INCLUDED := 1
-include $(MAKEFILEDIR)/configure/directory_variables.mk
+include $(MAKEFILEDIR)/configure/directory_variables/build.mk
_MANDIR := $(builddir)/man
@@ -14,9 +14,9 @@ _MANDIR := $(builddir)/man
.PHONY: build
build: \
- build-book \
build-catman \
build-html \
+ build-man \
build-pdf \
build-ps \
build-ex;
diff --git a/share/mk/build/book.mk b/share/mk/build/book.mk
deleted file mode 100644
index a941ced..0000000
--- a/share/mk/build/book.mk
+++ /dev/null
@@ -1,42 +0,0 @@
-# Copyright 2023-2024, Alejandro Colomar <alx@kernel.org>
-# SPDX-License-Identifier: LGPL-3.0-only WITH LGPL-3.0-linking-exception
-
-
-ifndef MAKEFILE_BUILD_BOOK_INCLUDED
-MAKEFILE_BUILD_BOOK_INCLUDED := 1
-
-
-include $(MAKEFILEDIR)/build/_.mk
-include $(MAKEFILEDIR)/configure/build-depends/coreutils.mk
-include $(MAKEFILEDIR)/configure/build-depends/groff.mk
-include $(MAKEFILEDIR)/configure/build-depends/groff-base.mk
-include $(MAKEFILEDIR)/configure/build-depends/moreutils.mk
-include $(MAKEFILEDIR)/configure/src.mk
-include $(MAKEFILEDIR)/src.mk
-
-
-LMBDIR := $(srcdir)/scripts/LinuxManBook
-BUILDLMB := $(LMBDIR)/build.sh
-
-
-_LMB := $(_MANDIR)/man-pages.pdf
-
-
-$(_LMB): $(MANPAGES) $(wildcard $(LMBDIR)/* $(LMBDIR)/*/*) | $$(@D)/
- $(info $(INFO_)Build $@)
- CAT='$(CAT)' \
- PRECONV='$(PRECONV)' \
- PIC='$(PIC)' \
- TBL='$(TBL)' \
- EQN='$(EQN)' \
- TROFF='$(TROFF)' \
- GROPDF='$(GROPDF)' \
- $(BUILDLMB) $(MANDIR) \
- | $(SPONGE) $@
-
-
-.PHONY: build-book
-build-book: $(_LMB);
-
-
-endif # include guard
diff --git a/share/mk/build/catman/eqn.mk b/share/mk/build/catman/eqn.mk
index 48b6e75..d5796a8 100644
--- a/share/mk/build/catman/eqn.mk
+++ b/share/mk/build/catman/eqn.mk
@@ -7,8 +7,9 @@ MAKEFILE_BUILD_CATMAN_EQN_INCLUDED := 1
include $(MAKEFILEDIR)/build/pre/tbl.mk
-include $(MAKEFILEDIR)/configure/build-depends/grep.mk
-include $(MAKEFILEDIR)/configure/build-depends/groff-base.mk
+include $(MAKEFILEDIR)/configure/build-depends/grep/grep.mk
+include $(MAKEFILEDIR)/configure/build-depends/groff-base/eqn.mk
+include $(MAKEFILEDIR)/configure/build-depends/groff-base/nroff.mk
_CATMAN_troff := $(patsubst %.eqn,%.cat.troff,$(_MAN_eqn))
diff --git a/share/mk/build/catman/grotty.mk b/share/mk/build/catman/grotty.mk
index 7def414..db2ab3d 100644
--- a/share/mk/build/catman/grotty.mk
+++ b/share/mk/build/catman/grotty.mk
@@ -7,10 +7,10 @@ MAKEFILE_BUILD_CATMAN_GROTTY_INCLUDED := 1
include $(MAKEFILEDIR)/build/catman/troff.mk
-include $(MAKEFILEDIR)/configure/build-depends/groff-base.mk
+include $(MAKEFILEDIR)/configure/build-depends/groff-base/grotty.mk
-_CATMAN := $(patsubst %.cat.set,%.cat,$(_CATMAN_MAN_set) $(_CATMAN_MDOC_set))
+_CATMAN := $(patsubst %.cat.set, %.cat, $(_CATMAN_MAN_set) $(_CATMAN_MDOC_set))
$(_CATMAN): %.cat: %.cat.set $(MK) | $$(@D)/
diff --git a/share/mk/build/catman/troff.mk b/share/mk/build/catman/troff.mk
index c38ba17..d5dd9d5 100644
--- a/share/mk/build/catman/troff.mk
+++ b/share/mk/build/catman/troff.mk
@@ -7,12 +7,13 @@ MAKEFILE_BUILD_CATMAN_TROFF_INCLUDED := 1
include $(MAKEFILEDIR)/build/_.mk
-include $(MAKEFILEDIR)/configure/build-depends/coreutils.mk
-include $(MAKEFILEDIR)/configure/build-depends/grep.mk
-include $(MAKEFILEDIR)/configure/build-depends/groff-base.mk
-include $(MAKEFILEDIR)/configure/src.mk
+include $(MAKEFILEDIR)/build/man/man.mk
+include $(MAKEFILEDIR)/build/man/mdoc.mk
+include $(MAKEFILEDIR)/configure/build-depends/coreutils/true.mk
+include $(MAKEFILEDIR)/configure/build-depends/grep/grep.mk
+include $(MAKEFILEDIR)/configure/build-depends/groff-base/nroff.mk
+include $(MAKEFILEDIR)/configure/build-depends/groff-base/troff.mk
include $(MAKEFILEDIR)/configure/xfail.mk
-include $(MAKEFILEDIR)/src.mk
_XFAIL_CATMAN_MAN_set := \
@@ -45,12 +46,11 @@ _XFAIL_CATMAN_MAN_set := \
$(_MANDIR)/man8/zic.8.cat.set
+troff_catman_ignore_grep := $(MAKEFILEDIR)/build/catman/troff.ignore.grep
-troff_man_ignore_grep := $(MAKEFILEDIR)/build/catman/troff.ignore.grep
-
-_CATMAN_MAN_set := $(patsubst $(MANDIR)/%,$(_MANDIR)/%.cat.set,$(NONSO_MAN))
-_CATMAN_MDOC_set := $(patsubst $(MANDIR)/%,$(_MANDIR)/%.cat.set,$(NONSO_MDOC))
+_CATMAN_MAN_set := $(patsubst %, %.cat.set, $(_NONSO_MAN))
+_CATMAN_MDOC_set := $(patsubst %, %.cat.set, $(_NONSO_MDOC))
ifeq ($(SKIP_XFAIL),yes)
@@ -58,10 +58,10 @@ _CATMAN_MAN_set := $(filter-out $(_XFAIL_CATMAN_MAN_set), $(_CATMAN_MAN_set))
endif
-$(_CATMAN_MAN_set): %.cat.set: %.cat.troff $(troff_man_ignore_grep) $(MK) | $$(@D)/
+$(_CATMAN_MAN_set): %.cat.set: %.cat.troff $(troff_catman_ignore_grep) $(MK) | $$(@D)/
$(info $(INFO_)TROFF $@)
! ($(TROFF) -man $(TROFFFLAGS) $(NROFFFLAGS) <$< 2>&1 >$@ \
- | $(GREP) -v -f '$(troff_man_ignore_grep)' \
+ | $(GREP) -v -f '$(troff_catman_ignore_grep)' \
|| $(TRUE); \
) \
| $(GREP) ^ >&2
diff --git a/share/mk/build/examples/_.mk b/share/mk/build/examples/_.mk
index c01a952..f1e51e6 100644
--- a/share/mk/build/examples/_.mk
+++ b/share/mk/build/examples/_.mk
@@ -2,23 +2,8 @@
# SPDX-License-Identifier: LGPL-3.0-only WITH LGPL-3.0-linking-exception
-ifndef MAKEFILE_BUILD_EX_DIR_INCLUDED
-MAKEFILE_BUILD_EX_DIR_INCLUDED := 1
-
-
-include $(MAKEFILEDIR)/build/_.mk
-include $(MAKEFILEDIR)/configure/build-depends/coreutils.mk
-include $(MAKEFILEDIR)/configure/src.mk
-include $(MAKEFILEDIR)/src.mk
-
-
-_PAGEEXDIRS := $(patsubst $(MANDIR)/%,$(_MANDIR)/%.d/,$(NONSO_MAN))
-
-
-$(_PAGEEXDIRS):
- +$(info $(INFO_)MKDIR $@)
- +$(MKDIR) -p $@
- +$(TOUCH) $@
+ifndef MAKEFILE_BUILD_EX_INCLUDED
+MAKEFILE_BUILD_EX_INCLUDED := 1
.PHONY: build-ex
diff --git a/share/mk/build/examples/cc.mk b/share/mk/build/examples/cc.mk
index 6513fbe..f1524d4 100644
--- a/share/mk/build/examples/cc.mk
+++ b/share/mk/build/examples/cc.mk
@@ -8,12 +8,12 @@ MAKEFILE_BUILD_EX_CC_INCLUDED := 1
include $(MAKEFILEDIR)/build/_.mk
include $(MAKEFILEDIR)/build/examples/src.mk
-include $(MAKEFILEDIR)/configure/build-depends/cc.mk
-include $(MAKEFILEDIR)/configure/build-depends/cpp.mk
+include $(MAKEFILEDIR)/configure/build-depends/gcc/cc.mk
+include $(MAKEFILEDIR)/configure/build-depends/cpp/cpp.mk
include $(MAKEFILEDIR)/configure/xfail.mk
-_XFAIL_UNITS_ex_o := \
+_XFAIL_EX_TU_o := \
$(_MANDIR)/man2/bpf.2.d/bpf.o \
$(_MANDIR)/man2/seccomp.2.d/seccomp.o \
$(_MANDIR)/man2/sigaction.2.d/sigaction.o \
@@ -36,19 +36,19 @@ _XFAIL_UNITS_ex_o := \
$(_MANDIR)/man3head/printf.h.3head.d/register_printf_specifier.o
-_UNITS_ex_o := $(patsubst %.c,%.o,$(_UNITS_ex_c))
+_EX_TU_o := $(patsubst %.c, %.o, $(_EX_TU_c))
ifeq ($(SKIP_XFAIL),yes)
-_UNITS_ex_o := $(filter-out $(_XFAIL_UNITS_ex_o), $(_UNITS_ex_o))
+_EX_TU_o := $(filter-out $(_XFAIL_EX_TU_o), $(_EX_TU_o))
endif
-$(_UNITS_ex_o): %.o: %.c $(MK)
+$(_EX_TU_o): %.o: %.c $(MK)
$(info $(INFO_)CC $@)
$(CC) -c $(CPPFLAGS) $(CFLAGS) -o $@ $<
.PHONY: build-ex-cc
-build-ex-cc: $(_UNITS_ex_o);
+build-ex-cc: $(_EX_TU_o);
endif # include guard
diff --git a/share/mk/build/examples/dir.mk b/share/mk/build/examples/dir.mk
new file mode 100644
index 0000000..8aaaad3
--- /dev/null
+++ b/share/mk/build/examples/dir.mk
@@ -0,0 +1,27 @@
+# Copyright 2021-2024, Alejandro Colomar <alx@kernel.org>
+# SPDX-License-Identifier: LGPL-3.0-only WITH LGPL-3.0-linking-exception
+
+
+ifndef MAKEFILE_BUILD_EX_DIR_INCLUDED
+MAKEFILE_BUILD_EX_DIR_INCLUDED := 1
+
+
+include $(MAKEFILEDIR)/build/man/man.mk
+include $(MAKEFILEDIR)/configure/build-depends/coreutils/mkdir.mk
+include $(MAKEFILEDIR)/configure/build-depends/coreutils/touch.mk
+
+
+_PAGEEXDIRS := $(patsubst %, %.d/, $(_NONSO_MAN))
+
+
+$(_PAGEEXDIRS):
+ +$(info $(INFO_)MKDIR $@)
+ +$(MKDIR) -p $@
+ +$(TOUCH) $@
+
+
+.PHONY: build-ex-dir
+build-ex-dir: $(_PAGEEXDIRS);
+
+
+endif # include guard
diff --git a/share/mk/build/examples/ld.mk b/share/mk/build/examples/ld.mk
index 9d5535d..6d63251 100644
--- a/share/mk/build/examples/ld.mk
+++ b/share/mk/build/examples/ld.mk
@@ -8,11 +8,11 @@ MAKEFILE_BUILD_EX_LD_INCLUDED := 1
include $(MAKEFILEDIR)/build/_.mk
include $(MAKEFILEDIR)/build/examples/cc.mk
-include $(MAKEFILEDIR)/configure/build-depends/ld.mk
+include $(MAKEFILEDIR)/configure/build-depends/binutils/ld.mk
include $(MAKEFILEDIR)/configure/xfail.mk
-_XFAIL_UNITS_ex_bin := \
+_XFAIL_EX_TU_bin := \
$(_MANDIR)/man2/add_key.2.d/add_key \
$(_MANDIR)/man2/keyctl.2.d/key_instantiate \
$(_MANDIR)/man2/request_key.2.d/t_request_key \
@@ -33,19 +33,19 @@ _XFAIL_UNITS_ex_bin := \
$(_MANDIR)/man3/tsearch.3.d/tsearch
-_UNITS_ex_bin := $(patsubst %.o,%,$(_UNITS_ex_o))
+_EX_TU_bin := $(patsubst %.o, %, $(_EX_TU_o))
ifeq ($(SKIP_XFAIL),yes)
-_UNITS_ex_bin := $(filter-out $(_XFAIL_UNITS_ex_bin), $(_UNITS_ex_bin))
+_EX_TU_bin := $(filter-out $(_XFAIL_EX_TU_bin), $(_EX_TU_bin))
endif
-$(_UNITS_ex_bin): %: %.o $(MK)
+$(_EX_TU_bin): %: %.o $(MK)
$(info $(INFO_)LD $@)
$(LD) $(LDFLAGS) -o $@ $< $(LDLIBS)
.PHONY: build-ex-ld
-build-ex-ld: $(_UNITS_ex_bin);
+build-ex-ld: $(_EX_TU_bin);
endif # include guard
diff --git a/share/mk/build/examples/src.mk b/share/mk/build/examples/src.mk
index f47a713..def626c 100644
--- a/share/mk/build/examples/src.mk
+++ b/share/mk/build/examples/src.mk
@@ -7,16 +7,17 @@ MAKEFILE_BUILD_EX_SRC_INCLUDED := 1
include $(MAKEFILEDIR)/build/_.mk
-include $(MAKEFILEDIR)/configure/build-depends/coreutils.mk
-include $(MAKEFILEDIR)/configure/build-depends/findutils.mk
-include $(MAKEFILEDIR)/configure/build-depends/grep.mk
-include $(MAKEFILEDIR)/configure/build-depends/mandoc.mk
-include $(MAKEFILEDIR)/configure/build-depends/sed.mk
-include $(MAKEFILEDIR)/configure/directory_variables.mk
-include $(MAKEFILEDIR)/src.mk
+include $(MAKEFILEDIR)/configure/build-depends/coreutils/head.mk
+include $(MAKEFILEDIR)/configure/build-depends/findutils/find.mk
+include $(MAKEFILEDIR)/configure/build-depends/findutils/xargs.mk
+include $(MAKEFILEDIR)/configure/build-depends/grep/grep.mk
+include $(MAKEFILEDIR)/configure/build-depends/mandoc/mandoc.mk
+include $(MAKEFILEDIR)/configure/build-depends/sed/sed.mk
+include $(MAKEFILEDIR)/configure/directory_variables/src.mk
+include $(MAKEFILEDIR)/src/sortman.mk
-_UNITS_ex_src := \
+_EX_TU_src := \
$(patsubst $(MANDIR)/%, $(_MANDIR)/%, \
$(shell \
$(FIND) $(MANDIR)/* -type f \
@@ -28,13 +29,13 @@ _UNITS_ex_src := \
| $(SED) 's,:,\\:,g' \
) \
)
-_UNITS_ex_h := $(filter %.h,$(_UNITS_ex_src))
-_UNITS_ex_c := $(filter %.c,$(_UNITS_ex_src))
+_EX_TU_h := $(filter %.h, $(_EX_TU_src))
+_EX_TU_c := $(filter %.c, $(_EX_TU_src))
-$(_UNITS_ex_src): $$(patsubst $(_MANDIR)/%.d,$(MANDIR)/%,$$(@D)) $(MK) | $$(@D)/
-$(_UNITS_ex_c): $$(filter $$(@D)/%.h,$(_UNITS_ex_h))
-$(_UNITS_ex_src):
+$(_EX_TU_src): $$(patsubst %.d, %, $$(@D)) $(MK) | $$(@D)/
+$(_EX_TU_c): $$(filter $$(@D)/%.h, $(_EX_TU_h))
+$(_EX_TU_src):
$(info $(INFO_)SED $@)
<$< \
$(SED) -n \
@@ -49,7 +50,7 @@ $(_UNITS_ex_src):
.PHONY: build-ex-src
-build-ex-src: $(_UNITS_ex_src);
+build-ex-src: $(_EX_TU_src);
endif # include guard
diff --git a/share/mk/build/fonts/_.mk b/share/mk/build/fonts/_.mk
new file mode 100644
index 0000000..cd5d29e
--- /dev/null
+++ b/share/mk/build/fonts/_.mk
@@ -0,0 +1,19 @@
+# Copyright 2021-2024, Alejandro Colomar <alx@kernel.org>
+# SPDX-License-Identifier: LGPL-3.0-only WITH LGPL-3.0-linking-exception
+
+
+ifndef MAKEFILE_BUILD_FONTS_INCLUDED
+MAKEFILE_BUILD_FONTS_INCLUDED := 1
+
+
+include $(MAKEFILEDIR)/configure/directory_variables/build.mk
+
+
+_FONTSDIR := $(builddir)/fonts
+
+
+.PHONY: build-fonts
+build-fonts: build-fonts-download build-fonts-tinos
+
+
+endif # include guard
diff --git a/share/mk/build/fonts/devpdf/download b/share/mk/build/fonts/devpdf/download
new file mode 100644
index 0000000..e230c82
--- /dev/null
+++ b/share/mk/build/fonts/devpdf/download
@@ -0,0 +1 @@
+ Tinos Tinos.pfa
diff --git a/share/mk/build/fonts/download.mk b/share/mk/build/fonts/download.mk
new file mode 100644
index 0000000..3320c97
--- /dev/null
+++ b/share/mk/build/fonts/download.mk
@@ -0,0 +1,26 @@
+# Copyright 2021-2024, Alejandro Colomar <alx@kernel.org>
+# SPDX-License-Identifier: LGPL-3.0-only WITH LGPL-3.0-linking-exception
+
+
+ifndef MAKEFILE_BUILD_FONTS_DOWNLOAD_INCLUDED
+MAKEFILE_BUILD_FONTS_DOWNLOAD_INCLUDED := 1
+
+
+include $(MAKEFILEDIR)/build/fonts/_.mk
+
+
+DOWNLOAD := $(MAKEFILEDIR)/build/fonts/devpdf/download
+
+_DOWNLOAD := $(_FONTSDIR)/devpdf/download
+
+
+$(_DOWNLOAD): $(_FONTSDIR)/%: $(MAKEFILEDIR)/build/fonts/% $(MK) | $$(@D)/
+ $(info $(INFO_)CP $@)
+ $(CP) -T $< $@
+
+
+.PHONY: build-fonts-download
+build-fonts-download: $(_DOWNLOAD)
+
+
+endif # include guard
diff --git a/share/mk/build/fonts/tinos/_.mk b/share/mk/build/fonts/tinos/_.mk
new file mode 100644
index 0000000..01bc122
--- /dev/null
+++ b/share/mk/build/fonts/tinos/_.mk
@@ -0,0 +1,20 @@
+# Copyright 2021-2024, Alejandro Colomar <alx@kernel.org>
+# SPDX-License-Identifier: LGPL-3.0-only WITH LGPL-3.0-linking-exception
+
+
+ifndef MAKEFILE_BUILD_FONTS_TINOS_INCLUDED
+MAKEFILE_BUILD_FONTS_TINOS_INCLUDED := 1
+
+
+include $(MAKEFILEDIR)/build/fonts/tinos/pfa.mk
+include $(MAKEFILEDIR)/build/fonts/tinos/dit.mk
+
+
+_TINOS := $(_TINOS_PFA) $(_TINOSR)
+
+
+.PHONY: build-fonts-tinos
+build-fonts-tinos: $(_TINOS)
+
+
+endif # include guard
diff --git a/share/mk/build/fonts/tinos/afm.mk b/share/mk/build/fonts/tinos/afm.mk
new file mode 100644
index 0000000..0745fea
--- /dev/null
+++ b/share/mk/build/fonts/tinos/afm.mk
@@ -0,0 +1,22 @@
+# Copyright 2021-2024, Alejandro Colomar <alx@kernel.org>
+# SPDX-License-Identifier: LGPL-3.0-only WITH LGPL-3.0-linking-exception
+
+
+ifndef MAKEFILE_BUILD_FONTS_TINOS_AFM_INCLUDED
+MAKEFILE_BUILD_FONTS_TINOS_AFM_INCLUDED := 1
+
+
+include $(MAKEFILEDIR)/build/fonts/_.mk
+include $(MAKEFILEDIR)/configure/build-depends/texlive-fonts-extra-links/Tinos-Regular.ttf.mk
+include $(MAKEFILEDIR)/configure/build-depends/fontforge/fontforge.mk
+
+
+_TINOSR_AFM := $(_FONTSDIR)/devpdf/TinosR.afm
+
+
+$(_TINOSR_AFM): $(TINOSR_TTF) $(MK) | $$(@D)/
+ $(info $(INFO_)FONTFORGE $@)
+ $(FONTFORGE) $(FONTFORGEFLAGS) -lang=ff -c 'Open("$<");Generate("$@");'
+
+
+endif # include guard
diff --git a/share/mk/build/fonts/tinos/dit.mk b/share/mk/build/fonts/tinos/dit.mk
new file mode 100644
index 0000000..b00a05d
--- /dev/null
+++ b/share/mk/build/fonts/tinos/dit.mk
@@ -0,0 +1,22 @@
+# Copyright 2021-2024, Alejandro Colomar <alx@kernel.org>
+# SPDX-License-Identifier: LGPL-3.0-only WITH LGPL-3.0-linking-exception
+
+
+ifndef MAKEFILE_BUILD_FONTS_TINOS_DIT_INCLUDED
+MAKEFILE_BUILD_FONTS_TINOS_DIT_INCLUDED := 1
+
+
+include $(MAKEFILEDIR)/build/fonts/_.mk
+include $(MAKEFILEDIR)/build/fonts/tinos/afm.mk
+include $(MAKEFILEDIR)/configure/build-depends/groff/afmtodit.mk
+
+
+_TINOSR := $(_FONTSDIR)/devpdf/TinosR
+
+
+$(_TINOSR): $(_FONTSDIR)/%: $(PDF_TEXT_ENC) $(_TINOSR_AFM) $(PDF_TEXT_MAP) $(MK) | $$(@D)/
+ $(info $(INFO_)AFMTODIT $@)
+ $(AFMTODIT) -e $(PDF_TEXT_ENC) $(_TINOSR_AFM) $(PDF_TEXT_MAP) $@
+
+
+endif # include guard
diff --git a/share/mk/build/fonts/tinos/pfa.mk b/share/mk/build/fonts/tinos/pfa.mk
new file mode 100644
index 0000000..f65b087
--- /dev/null
+++ b/share/mk/build/fonts/tinos/pfa.mk
@@ -0,0 +1,22 @@
+# Copyright 2021-2024, Alejandro Colomar <alx@kernel.org>
+# SPDX-License-Identifier: LGPL-3.0-only WITH LGPL-3.0-linking-exception
+
+
+ifndef MAKEFILE_BUILD_FONTS_TINOS_PFA_INCLUDED
+MAKEFILE_BUILD_FONTS_TINOS_PFA_INCLUDED := 1
+
+
+include $(MAKEFILEDIR)/build/fonts/_.mk
+include $(MAKEFILEDIR)/configure/build-depends/texlive-fonts-extra/Tinos.pfb.mk
+include $(MAKEFILEDIR)/configure/build-depends/groff/pfbtops.mk
+
+
+_TINOS_PFA := $(_FONTSDIR)/devpdf/Tinos.pfa
+
+
+$(_TINOS_PFA): $(TINOS_PFB) $(MK) | $$(@D)/
+ $(info $(INFO_)PFBTOPS $@)
+ $(PFBTOPS) <$< >$@
+
+
+endif # include guard
diff --git a/share/mk/build/html/post-grohtml.mk b/share/mk/build/html/post-grohtml.mk
index fe77776..26effbb 100644
--- a/share/mk/build/html/post-grohtml.mk
+++ b/share/mk/build/html/post-grohtml.mk
@@ -7,10 +7,10 @@ MAKEFILE_BUILD_HTML_POST_GROHTML_INCLUDED := 1
include $(MAKEFILEDIR)/build/html/troff.mk
-include $(MAKEFILEDIR)/configure/build-depends/groff.mk
+include $(MAKEFILEDIR)/configure/build-depends/groff/post-grohtml.mk
-_HTMLMAN := $(patsubst %.html.set,%.html,$(_HTMLMAN_MAN_set) $(_HTMLMAN_MDOC_set))
+_HTMLMAN := $(patsubst %.html.set, %.html, $(_HTMLMAN_MAN_set) $(_HTMLMAN_MDOC_set))
$(_HTMLMAN): %.html: %.html.set $(MK) | $$(@D)/
diff --git a/share/mk/build/html/troff.mk b/share/mk/build/html/troff.mk
index 010c211..9b6f1fd 100644
--- a/share/mk/build/html/troff.mk
+++ b/share/mk/build/html/troff.mk
@@ -7,16 +7,18 @@ MAKEFILE_BUILD_HTML_TROFF_INCLUDED := 1
include $(MAKEFILEDIR)/build/_.mk
-include $(MAKEFILEDIR)/configure/build-depends/grep.mk
-include $(MAKEFILEDIR)/configure/build-depends/groff-base.mk
-include $(MAKEFILEDIR)/configure/src.mk
+include $(MAKEFILEDIR)/build/man/man.mk
+include $(MAKEFILEDIR)/build/man/mdoc.mk
+include $(MAKEFILEDIR)/configure/build-depends/grep/grep.mk
+include $(MAKEFILEDIR)/configure/build-depends/groff-base/troff.mk
include $(MAKEFILEDIR)/configure/xfail.mk
-include $(MAKEFILEDIR)/src.mk
_XFAIL_HTMLMAN_MAN_set := \
$(_MANDIR)/man2/fanotify_init.2.html.set \
+ $(_MANDIR)/man2/mbind.2.html.set \
$(_MANDIR)/man2/membarrier.2.html.set \
+ $(_MANDIR)/man2/set_mempolicy.2.html.set \
$(_MANDIR)/man5/proc.5.html.set \
$(_MANDIR)/man7/bpf-helpers.7.html.set \
$(_MANDIR)/man7/charsets.7.html.set \
@@ -25,8 +27,8 @@ _XFAIL_HTMLMAN_MAN_set := \
$(_MANDIR)/man8/zic.8.html.set
-_HTMLMAN_MAN_set := $(patsubst $(MANDIR)/%,$(_MANDIR)/%.html.set,$(NONSO_MAN))
-_HTMLMAN_MDOC_set:= $(patsubst $(MANDIR)/%,$(_MANDIR)/%.html.set,$(NONSO_MDOC))
+_HTMLMAN_MAN_set := $(patsubst %, %.html.set, $(_NONSO_MAN))
+_HTMLMAN_MDOC_set := $(patsubst %, %.html.set, $(_NONSO_MDOC))
ifeq ($(SKIP_XFAIL),yes)
diff --git a/share/mk/build/man/_.mk b/share/mk/build/man/_.mk
new file mode 100644
index 0000000..6a7f624
--- /dev/null
+++ b/share/mk/build/man/_.mk
@@ -0,0 +1,21 @@
+# Copyright 2021-2024, Alejandro Colomar <alx@kernel.org>
+# SPDX-License-Identifier: LGPL-3.0-only WITH LGPL-3.0-linking-exception
+
+
+ifndef MAKEFILE_BUILD_MAN_INCLUDED
+MAKEFILE_BUILD_MAN_INCLUDED := 1
+
+
+include $(MAKEFILEDIR)/build/_.mk
+include $(MAKEFILEDIR)/configure/directory_variables/src.mk
+include $(MAKEFILEDIR)/src/man.mk
+
+
+_MANPAGES := $(patsubst $(MANDIR)/%, $(_MANDIR)/%, $(MANPAGES))
+
+
+.PHONY: build-man
+build-man: build-man-man build-man-mdoc build-man-so;
+
+
+endif # include guard
diff --git a/share/mk/build/man/man.mk b/share/mk/build/man/man.mk
new file mode 100644
index 0000000..b15ea0d
--- /dev/null
+++ b/share/mk/build/man/man.mk
@@ -0,0 +1,32 @@
+# Copyright 2021-2024, Alejandro Colomar <alx@kernel.org>
+# SPDX-License-Identifier: LGPL-3.0-only WITH LGPL-3.0-linking-exception
+
+
+ifndef MAKEFILE_BUILD_MAN_MAN_INCLUDED
+MAKEFILE_BUILD_MAN_MAN_INCLUDED := 1
+
+
+include $(MAKEFILEDIR)/build/_.mk
+include $(MAKEFILEDIR)/configure/build-depends/git/git.mk
+include $(MAKEFILEDIR)/configure/build-depends/sed/sed.mk
+include $(MAKEFILEDIR)/configure/directory_variables/src.mk
+include $(MAKEFILEDIR)/configure/verbose.mk
+include $(MAKEFILEDIR)/configure/version.mk
+include $(MAKEFILEDIR)/src/man.mk
+
+
+_NONSO_MAN := $(patsubst $(MANDIR)/%, $(_MANDIR)/%, $(NONSO_MAN))
+
+
+$(_NONSO_MAN): $(_MANDIR)/%: $(MANDIR)/% $(MK) | $$(@D)/
+ $(info $(INFO_)SED $@)
+ <$< \
+ $(SED) "/^\.TH/s/(date)/$$($(MANPAGEDATECMD))/" \
+ | $(SED) '/^\.TH/s/(unreleased)/$(DISTVERSION)/' >$@
+
+
+.PHONY: build-man-man
+build-man-man: $(_NONSO_MAN)
+
+
+endif # include guard
diff --git a/share/mk/build/man/mdoc.mk b/share/mk/build/man/mdoc.mk
new file mode 100644
index 0000000..271a0a6
--- /dev/null
+++ b/share/mk/build/man/mdoc.mk
@@ -0,0 +1,27 @@
+# Copyright 2021-2024, Alejandro Colomar <alx@kernel.org>
+# SPDX-License-Identifier: LGPL-3.0-only WITH LGPL-3.0-linking-exception
+
+
+ifndef MAKEFILE_BUILD_MAN_MDOC_INCLUDED
+MAKEFILE_BUILD_MAN_MDOC_INCLUDED := 1
+
+
+include $(MAKEFILEDIR)/build/_.mk
+include $(MAKEFILEDIR)/configure/build-depends/coreutils/cp.mk
+include $(MAKEFILEDIR)/configure/directory_variables/src.mk
+include $(MAKEFILEDIR)/src/man.mk
+
+
+_NONSO_MDOC := $(patsubst $(MANDIR)/%, $(_MANDIR)/%, $(NONSO_MDOC))
+
+
+$(_NONSO_MDOC): $(_MANDIR)/%: $(MANDIR)/% $(MK) | $$(@D)/
+ $(info $(INFO_)CP $@)
+ $(CP) -T $< $@
+
+
+.PHONY: build-man-mdoc
+build-man-mdoc: $(_NONSO_MDOC)
+
+
+endif # include guard
diff --git a/share/mk/build/man/so.mk b/share/mk/build/man/so.mk
new file mode 100644
index 0000000..6ff1e90
--- /dev/null
+++ b/share/mk/build/man/so.mk
@@ -0,0 +1,27 @@
+# Copyright 2021-2024, Alejandro Colomar <alx@kernel.org>
+# SPDX-License-Identifier: LGPL-3.0-only WITH LGPL-3.0-linking-exception
+
+
+ifndef MAKEFILE_BUILD_MAN_SO_INCLUDED
+MAKEFILE_BUILD_MAN_SO_INCLUDED := 1
+
+
+include $(MAKEFILEDIR)/build/_.mk
+include $(MAKEFILEDIR)/configure/build-depends/coreutils/cp.mk
+include $(MAKEFILEDIR)/configure/directory_variables/src.mk
+include $(MAKEFILEDIR)/src/man.mk
+
+
+_SO_MAN := $(patsubst $(MANDIR)/%, $(_MANDIR)/%, $(SO_MAN))
+
+
+$(_SO_MAN): $(_MANDIR)/%: $(MANDIR)/% $(MK) | $$(@D)/
+ $(info $(INFO_)CP $@)
+ $(CP) -T $< $@
+
+
+.PHONY: build-man-so
+build-man-so: $(_SO_MAN)
+
+
+endif # include guard
diff --git a/share/mk/build/pdf/_.mk b/share/mk/build/pdf/_.mk
index f6660aa..65083a0 100644
--- a/share/mk/build/pdf/_.mk
+++ b/share/mk/build/pdf/_.mk
@@ -7,7 +7,7 @@ MAKEFILE_BUILD_PDF_INCLUDED := 1
.PHONY: build-pdf
-build-pdf: build-pdf-gropdf;
+build-pdf: build-pdf-book build-pdf-pages;
endif # include guard
diff --git a/share/mk/build/pdf/book/_.mk b/share/mk/build/pdf/book/_.mk
new file mode 100644
index 0000000..03595f6
--- /dev/null
+++ b/share/mk/build/pdf/book/_.mk
@@ -0,0 +1,51 @@
+# Copyright 2023-2024, Alejandro Colomar <alx@kernel.org>
+# SPDX-License-Identifier: LGPL-3.0-only WITH LGPL-3.0-linking-exception
+
+
+ifndef MAKEFILE_BUILD_PDF_BOOK_INCLUDED
+MAKEFILE_BUILD_PDF_BOOK_INCLUDED := 1
+
+
+include $(MAKEFILEDIR)/build/_.mk
+include $(MAKEFILEDIR)/build/man/_.mk
+include $(MAKEFILEDIR)/build/fonts/_.mk
+include $(MAKEFILEDIR)/build/fonts/tinos/_.mk
+include $(MAKEFILEDIR)/configure/build-depends/coreutils/cat.mk
+include $(MAKEFILEDIR)/configure/build-depends/groff/gropdf.mk
+include $(MAKEFILEDIR)/configure/build-depends/groff-base/eqn.mk
+include $(MAKEFILEDIR)/configure/build-depends/groff-base/pic.mk
+include $(MAKEFILEDIR)/configure/build-depends/groff-base/preconv.mk
+include $(MAKEFILEDIR)/configure/build-depends/groff-base/tbl.mk
+include $(MAKEFILEDIR)/configure/build-depends/groff-base/troff.mk
+include $(MAKEFILEDIR)/configure/build-depends/moreutils/sponge.mk
+include $(MAKEFILEDIR)/configure/version.mk
+
+
+MKBOOKDIR := $(MAKEFILEDIR)/build/pdf/book
+MKBOOK := $(wildcard $(MKBOOKDIR)/*)
+
+
+PDF_BOOK := $(DISTNAME).pdf
+_PDFDIR := $(builddir)
+_PDF_BOOK := $(_PDFDIR)/$(PDF_BOOK)
+
+
+$(_PDF_BOOK): $(_MANPAGES) $(_DOWNLOAD) $(_TINOS) $(MKBOOK) $(MK) | $$(@D)/
+ $(info $(INFO_)GROPDF $@)
+ $(MKBOOKDIR)/prepare.pl $(_MANDIR) \
+ | $(CAT) $(MKBOOKDIR)/front.roff /dev/stdin \
+ | $(PRECONV) \
+ | $(PIC) \
+ | $(TBL) \
+ | $(EQN) -Tpdf \
+ | $(TROFF) -mandoc -Tpdf -F$(_FONTSDIR) -dpaper=a4 -rC1 \
+ -ran*bookmark-base-level=1 $(TROFFFLAGS) \
+ | $(GROPDF) -F$(_FONTSDIR) -pa4 $(GROPDFFLAGS) \
+ | $(SPONGE) $@
+
+
+.PHONY: build-pdf-book
+build-pdf-book: $(_PDF_BOOK);
+
+
+endif # include guard
diff --git a/share/mk/build/pdf/book/front.roff b/share/mk/build/pdf/book/front.roff
new file mode 100644
index 0000000..fdf1a98
--- /dev/null
+++ b/share/mk/build/pdf/book/front.roff
@@ -0,0 +1,33 @@
+.de Hl
+.br
+\l'\\n[.l]u-\\n[.i]u\&\\$1'
+.br
+..
+.ps 10
+.vs 12
+.po 2c
+.ll 17c
+.sp 2.5c
+\Z@\D't 8p'@
+.Hl
+\D't 0'
+.sp .6i
+.ad r
+.ps 52
+\m[maroon]GNU/Linux\m[]
+.sp 18p
+.ps 16
+\f[BMB]THE MAN-PAGES BOOK\fP
+.sp 6i
+.ps 12
+\f[HB]Maintainers:\fP
+.sp 2p
+.ps 10
+\f[HB]Alejandro Colomar <alx@kernel.org> 2020 - present (5.09 - HEAD)
+.brp
+Michael Kerrisk <mtk.manpages@gmail.com> 2004 - 2021 (2.00 - 5.13)
+.brp
+Andries Brouwer <aeb@cwi.nl> 1995 - 2004 (1.6 - 1.70)
+.brp
+Rik Faith 1993 - 1995 \0(1.0 - 1.5)\fP
+.bp
diff --git a/share/mk/build/pdf/book/prepare.pl b/share/mk/build/pdf/book/prepare.pl
new file mode 100755
index 0000000..a074082
--- /dev/null
+++ b/share/mk/build/pdf/book/prepare.pl
@@ -0,0 +1,252 @@
+#!/usr/bin/perl -w
+#
+# BuildLinuxMan.pl : Build Linux manpages book
+# Deri James (& Brian Inglis) : 15 Dec 2022
+#
+# Params:-
+#
+# $1 = Directory holding the man pages
+#
+# (C) Copyright 2022, Deri James
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details
+# (http://www.gnu.org/licenses/gpl-2.0.html).
+#
+
+use strict;
+use File::Basename;
+
+my $inTS=0;
+my $inBlock=0;
+
+my %Sections=
+(
+ "1" => "General Commands Manual",
+ "2" => "System Calls Manual",
+ "2type" => "System Calls Manual (types)",
+ "3" => "Library Functions Manual",
+ "3const" => "Library Functions Manual (constants)",
+ "3head" => "Library Functions Manual (headers)",
+ "3type" => "Library Functions Manual (types)",
+ "4" => "Kernel Interfaces Manual",
+ "5" => "File Formats Manual",
+ "6" => "Games Manual",
+ "7" => "Miscellaneous Information Manual",
+ "8" => "System Manager's Manual",
+ "9" => "Kernel Developer's Manual",
+);
+
+my $dir=shift || '.';
+my $dir2=$dir;
+$dir2=~tr[.][_];
+my %files;
+my %aliases;
+
+foreach my $al (`find "$dir"/man*/ -type f \\
+ | grep "\\.[[:digit:]]\\([[:alpha:]][[:alnum:]]*\\)\\?\\>\$" \\
+ | xargs grep '^\\.so' /dev/null;`)
+{
+ #$al=~tr[.][_];
+ $al=~m/^$dir\/man\d[a-z]*\/(.*):\.\s*so\s*man\d[a-z]*\/(.*)/o;
+
+ $aliases{$1}=$2;
+}
+
+while (my ($k,$v)=each %aliases)
+{
+ while (exists($aliases{$v})) {
+ $v=$aliases{$v};
+ }
+}
+
+foreach my $fn (`find "$dir"/man*/ -type f \\
+ | grep "\\.[[:digit:]]\\([[:alpha:]][[:alnum:]]*\\)\\?\\>\$";`)
+{
+ $fn=~s/\n//;
+
+ my ($nm,$sec)=GetNmSec($fn,qr/\.\d[a-z]*/);
+ $files{"${nm}.$sec"}=[$fn,(exists($aliases{"${nm}.$sec"}))?$aliases{"${nm}.$sec"}:"${nm}.$sec"];
+}
+
+my $Section='';
+
+BuildBook();
+
+sub BuildBook
+{
+ print ".pdfpagenumbering D . 1\n.nr PDFOUTLINE.FOLDLEVEL 0\n.defcolor pdf:href.colour rgb 0.00 0.25 0.75\n.pdfinfo /Title \"The Linux man-pages Book\"\n.special TinosR S\n";
+
+ foreach my $bkmark (sort sortman keys %files) {
+ BuildPage($bkmark);
+ }
+}
+
+sub BuildPage
+{
+ my $bkmark=shift;
+
+ my $fn=$files{$bkmark}->[0];
+ my ($nm,$sec,$srt)=GetNmSec($bkmark,qr/\.[\da-z]+/);
+
+ my $title= "$nm\\($sec\\)";
+
+ print ".\\\" >>>>>> $nm($sec) <<<<<<\n.lf 0 $bkmark\n";
+
+ # If this is an alias, just add it to the outline panel.
+
+ # if new section add top level bookmark
+
+ if ($sec ne $Section) {
+ print ".nr PDFOUTLINE.FOLDLEVEL 1\n";
+ print ".pdfbookmark 1 $Sections{$sec}\n";
+ print ".nr PDFOUTLINE.FOLDLEVEL 2\n";
+ $Section=$sec;
+ }
+
+ if (exists($aliases{$bkmark})) {
+ print ".eo\n.device ps:exec [/Dest /$aliases{$bkmark} /Title ($title) /Level 2 /OUT pdfmark\n.ec\n.fl\n";
+ return;
+ }
+
+ if (open(F,'<',$fn)) {
+ while (<F>) {
+ if (m/^\.\\"/) {
+ print $_;
+ next;
+ }
+
+ chomp;
+
+ # This code is to determine whether we are within a tbl block and in a text block
+ # T{ and T}. This is fudge code particularly for the syscalls(7) page.
+
+ $inTS=1 if m/\.TS/;
+ $inTS=0,$inBlock=0 if m/\.TE/;
+
+ next if !$_;
+# s/^\s+//;
+
+ s/\\-/-/g if /^\.[BM]R\s+/;
+
+ if (m/^\.BR\s+([-\w\\.]+)\s+\((.+?)\)(.*)/ or m/^\.MR\s+([-\w\\.]+)\s+(\w+)\s+(.*)/ or m/^\\fB([-\w\\.]+)\\fR\((.+?)\)(.*)$/) {
+ my $bkmark="$1";
+ my $sec=$2;
+ my $after=$3;
+ $after=~s/\s\\".*//;
+ my $dest=$bkmark;
+ $dest=~s/\\-/-/g;
+
+ if (exists($files{"${bkmark}.$sec"})) {
+ my $dest=$files{"${bkmark}.$sec"}->[1];
+ $_=".pdfhref L -D \"$dest\" -A \"$after\" -- \\fI$bkmark\\fP($sec)";
+ } else {
+ $_=".IR $bkmark ($sec)\\c\n$after";
+ }
+ }
+
+ s/^\.BI \\fB/.BI /;
+ s/^\.BR\s+(\S+)\s*$/.B $1/;
+ s/^\.BI\s+(\S+)\s*$/.B $1/;
+ s/^\.IR\s+(\S+)\s*$/.I $1/;
+
+ # Fiddling for syscalls(7) :-(
+
+ if ($inTS) {
+ my @cols=split(/\t/,$_);
+
+ foreach my $c (@cols) {
+ $inBlock+=()=$c=~m/T\{/g;
+ $inBlock-=()=$c=~m/T\}/g;
+
+ my $mtch=$c=~s/\s*\\fB([-\w.]+)\\fP\((\w+)\)/doMR($1,$2)/ge;
+ $c="T{\n${c}\nT}" if $mtch and !$inBlock;
+ }
+
+ $_=join("\t",@cols);
+ s/\n\n/\n/g;
+ }
+
+ s/\\&\././ if m/^.TH /;
+
+ if (m/^\.TH\s+"?([-\w\\.]+)"?\s+"?(\w+)"?/) {
+
+ print "$_\n";
+
+ # Add a level two bookmark. We don't set it in the TH macro since the name passed
+ # may be different from the filename, i.e. file = unimplemented.2, TH = UNIMPLEMENTED 2
+
+ print ".pdfbookmark -T $bkmark 2 $nm($sec)\n";
+
+ next;
+ }
+ print "$_\n";
+ }
+ close(F);
+ }
+}
+
+sub doMR
+{
+ my $nm=shift;
+ my $sec=shift;
+
+ if (exists($files{"${nm}.$sec"})) {
+ return("\n.pdfhref L -D \"$files{\"${nm}.$sec\"}->[1]\" -A \"\\c\" -- \\fI$nm\\fP($sec)\n");
+ } else {
+ return("\\fI$nm\\fP($sec)");
+ }
+}
+
+sub GetNmSec
+{
+ my ($nm,$pth,$sec)=fileparse($_[0],$_[1]);
+ $sec=substr($sec,1);
+ my $srt=$nm;
+ $srt=~s/\..+?$//;
+ $srt=~s/^_+//;
+ $srt=$1.sprintf("%04d",$2) if $srt=~m/^(.+)(\d+)$/;
+ #$srt="$sec/$srt";
+ return($nm,$sec,$srt);
+}
+
+# add rpmvercmp
+#use RPM::VersionSort;
+#use Sort::Versions;
+
+sub sortman
+{
+# Sort - ignore case but frig it so that intro is the first entry.
+
+ my (undef,$s1,$c)=GetNmSec($a,qr/\.\d[a-z]*/);
+ my (undef,$s2,$d)=GetNmSec($b,qr/\.\d[a-z]*/);
+
+ my $cmp=$s1 cmp $s2;
+
+ return $cmp if $cmp;
+ return -1 if ($c=~m/^intro/ and $d!~m/^intro/);
+ return 1 if ($d=~m/^intro/ and $c!~m/^intro/);
+ $c=~tr[-_(][!" ];
+ $d=~tr[-_(][!" ];
+ $cmp=lc($c) cmp lc($d);
+ return($c cmp $d) if $cmp == 0;
+ return($cmp);
+}
+
+sub strhex
+{
+ my $res='';
+
+ foreach my $c (split('',$_[0])) {
+ $res.=sprintf("%02X",ord($c));
+ }
+
+ return($res);
+}
diff --git a/share/mk/build/pdf/gropdf.mk b/share/mk/build/pdf/gropdf.mk
deleted file mode 100644
index 0913122..0000000
--- a/share/mk/build/pdf/gropdf.mk
+++ /dev/null
@@ -1,25 +0,0 @@
-# Copyright 2021-2024, Alejandro Colomar <alx@kernel.org>
-# SPDX-License-Identifier: LGPL-3.0-only WITH LGPL-3.0-linking-exception
-
-
-ifndef MAKEFILE_BUILD_PDF_GROPDF_INCLUDED
-MAKEFILE_BUILD_PDF_GROPDF_INCLUDED := 1
-
-
-include $(MAKEFILEDIR)/build/pdf/troff.mk
-include $(MAKEFILEDIR)/configure/build-depends/groff.mk
-
-
-_PDFMAN := $(patsubst %.pdf.set,%.pdf,$(_PDFMAN_MAN_set) $(_PDFMAN_MDOC_set))
-
-
-$(_PDFMAN): %.pdf: %.pdf.set $(MK) | $$(@D)/
- $(info $(INFO_)GROPDF $@)
- $(GROPDF) $(GROPDFFLAGS) <$< >$@
-
-
-.PHONY: build-pdf-gropdf
-build-pdf-gropdf: $(_PDFMAN);
-
-
-endif # include guard
diff --git a/share/mk/build/pdf/pages/_.mk b/share/mk/build/pdf/pages/_.mk
new file mode 100644
index 0000000..0885039
--- /dev/null
+++ b/share/mk/build/pdf/pages/_.mk
@@ -0,0 +1,13 @@
+# Copyright 2021-2024, Alejandro Colomar <alx@kernel.org>
+# SPDX-License-Identifier: LGPL-3.0-only WITH LGPL-3.0-linking-exception
+
+
+ifndef MAKEFILE_BUILD_PDF_PAGES_INCLUDED
+MAKEFILE_BUILD_PDF_PAGES_INCLUDED := 1
+
+
+.PHONY: build-pdf-pages
+build-pdf-pages: build-pdf-pages-gropdf;
+
+
+endif # include guard
diff --git a/share/mk/build/pdf/eqn.mk b/share/mk/build/pdf/pages/eqn.mk
index bb0598b..aedf4cf 100644
--- a/share/mk/build/pdf/eqn.mk
+++ b/share/mk/build/pdf/pages/eqn.mk
@@ -2,13 +2,13 @@
# SPDX-License-Identifier: LGPL-3.0-only WITH LGPL-3.0-linking-exception
-ifndef MAKEFILE_BUILD_PDF_EQN_INCLUDED
-MAKEFILE_BUILD_PDF_EQN_INCLUDED := 1
+ifndef MAKEFILE_BUILD_PDF_PAGES_EQN_INCLUDED
+MAKEFILE_BUILD_PDF_PAGES_EQN_INCLUDED := 1
include $(MAKEFILEDIR)/build/pre/tbl.mk
-include $(MAKEFILEDIR)/configure/build-depends/grep.mk
-include $(MAKEFILEDIR)/configure/build-depends/groff-base.mk
+include $(MAKEFILEDIR)/configure/build-depends/grep/grep.mk
+include $(MAKEFILEDIR)/configure/build-depends/groff-base/eqn.mk
_PDFMAN_troff := $(patsubst %.eqn,%.pdf.troff,$(_MAN_eqn))
@@ -20,8 +20,8 @@ $(_PDFMAN_troff): %.pdf.troff: %.eqn $(MK) | $$(@D)/
| $(GREP) ^ >&2
-.PHONY: build-pdf-eqn
-build-pdf-eqn: $(_PDFMAN_troff);
+.PHONY: build-pdf-pages-eqn
+build-pdf-pages-eqn: $(_PDFMAN_troff);
endif # include guard
diff --git a/share/mk/build/pdf/pages/gropdf.mk b/share/mk/build/pdf/pages/gropdf.mk
new file mode 100644
index 0000000..39aa61a
--- /dev/null
+++ b/share/mk/build/pdf/pages/gropdf.mk
@@ -0,0 +1,25 @@
+# Copyright 2021-2024, Alejandro Colomar <alx@kernel.org>
+# SPDX-License-Identifier: LGPL-3.0-only WITH LGPL-3.0-linking-exception
+
+
+ifndef MAKEFILE_BUILD_PDF_PAGES_GROPDF_INCLUDED
+MAKEFILE_BUILD_PDF_PAGES_GROPDF_INCLUDED := 1
+
+
+include $(MAKEFILEDIR)/build/pdf/pages/troff.mk
+include $(MAKEFILEDIR)/configure/build-depends/groff/gropdf.mk
+
+
+_PDFMAN := $(patsubst %.pdf.set, %.pdf, $(_PDFMAN_MAN_set) $(_PDFMAN_MDOC_set))
+
+
+$(_PDFMAN): %.pdf: %.pdf.set $(MK) | $$(@D)/
+ $(info $(INFO_)GROPDF $@)
+ $(GROPDF) $(GROPDFFLAGS) <$< >$@
+
+
+.PHONY: build-pdf-pages-gropdf
+build-pdf-pages-gropdf: $(_PDFMAN);
+
+
+endif # include guard
diff --git a/share/mk/build/pdf/troff.mk b/share/mk/build/pdf/pages/troff.mk
index 5254d5d..dacfdb0 100644
--- a/share/mk/build/pdf/troff.mk
+++ b/share/mk/build/pdf/pages/troff.mk
@@ -2,21 +2,23 @@
# SPDX-License-Identifier: LGPL-3.0-only WITH LGPL-3.0-linking-exception
-ifndef MAKEFILE_BUILD_PDF_TROFF_INCLUDED
-MAKEFILE_BUILD_PDF_TROFF_INCLUDED := 1
+ifndef MAKEFILE_BUILD_PDF_PAGES_TROFF_INCLUDED
+MAKEFILE_BUILD_PDF_PAGES_TROFF_INCLUDED := 1
include $(MAKEFILEDIR)/build/_.mk
-include $(MAKEFILEDIR)/configure/build-depends/grep.mk
-include $(MAKEFILEDIR)/configure/build-depends/groff-base.mk
-include $(MAKEFILEDIR)/configure/src.mk
+include $(MAKEFILEDIR)/build/man/man.mk
+include $(MAKEFILEDIR)/build/man/mdoc.mk
+include $(MAKEFILEDIR)/configure/build-depends/grep/grep.mk
+include $(MAKEFILEDIR)/configure/build-depends/groff-base/troff.mk
include $(MAKEFILEDIR)/configure/xfail.mk
-include $(MAKEFILEDIR)/src.mk
_XFAIL_PDFMAN_MAN_set := \
$(_MANDIR)/man1/iconv.1.pdf.set \
$(_MANDIR)/man2/fanotify_init.2.pdf.set \
+ $(_MANDIR)/man2/membarrier.2.pdf.set \
+ $(_MANDIR)/man2/statx.2.pdf.set \
$(_MANDIR)/man2/syscall.2.pdf.set \
$(_MANDIR)/man3/newlocale.3.pdf.set \
$(_MANDIR)/man7/address_families.7.pdf.set \
@@ -42,8 +44,8 @@ _XFAIL_PDFMAN_MAN_set := \
$(_MANDIR)/man7/vdso.7.pdf.set
-_PDFMAN_MAN_set := $(patsubst $(MANDIR)/%,$(_MANDIR)/%.pdf.set,$(NONSO_MAN))
-_PDFMAN_MDOC_set := $(patsubst $(MANDIR)/%,$(_MANDIR)/%.pdf.set,$(NONSO_MDOC))
+_PDFMAN_MAN_set := $(patsubst %, %.pdf.set, $(_NONSO_MAN))
+_PDFMAN_MDOC_set := $(patsubst %, %.pdf.set, $(_NONSO_MDOC))
ifeq ($(SKIP_XFAIL),yes)
@@ -62,14 +64,14 @@ $(_PDFMAN_MDOC_set): %.pdf.set: %.pdf.troff $(MK) | $$(@D)/
| $(GREP) ^ >&2
-.PHONY: build-pdf-troff-man
-build-pdf-troff-man: $(_PDFMAN_MAN_set);
+.PHONY: build-pdf-pages-troff-man
+build-pdf-pages-troff-man: $(_PDFMAN_MAN_set);
-.PHONY: build-pdf-troff-mdoc
-build-pdf-troff-mdoc: $(_PDFMAN_MDOC_set);
+.PHONY: build-pdf-pages-troff-mdoc
+build-pdf-pages-troff-mdoc: $(_PDFMAN_MDOC_set);
-.PHONY: build-pdf-troff
-build-pdf-troff: build-pdf-troff-man build-pdf-troff-mdoc;
+.PHONY: build-pdf-pages-troff
+build-pdf-pages-troff: build-pdf-pages-troff-man build-pdf-pages-troff-mdoc;
endif # include guard
diff --git a/share/mk/build/pre/preconv.mk b/share/mk/build/pre/preconv.mk
index 73aa1da..6e8c881 100644
--- a/share/mk/build/pre/preconv.mk
+++ b/share/mk/build/pre/preconv.mk
@@ -6,16 +6,15 @@ ifndef MAKEFILE_BUILD_PRE_PRECONV_INCLUDED
MAKEFILE_BUILD_PRE_PRECONV_INCLUDED := 1
-include $(MAKEFILEDIR)/build/_.mk
-include $(MAKEFILEDIR)/configure/build-depends/groff-base.mk
-include $(MAKEFILEDIR)/configure/src.mk
-include $(MAKEFILEDIR)/src.mk
+include $(MAKEFILEDIR)/build/man/man.mk
+include $(MAKEFILEDIR)/build/man/mdoc.mk
+include $(MAKEFILEDIR)/configure/build-depends/groff-base/preconv.mk
-_MAN_tbl := $(patsubst $(MANDIR)/%,$(_MANDIR)/%.tbl,$(NONSO_MAN) $(NONSO_MDOC))
+_MAN_tbl := $(patsubst %, %.tbl, $(_NONSO_MAN) $(_NONSO_MDOC))
-$(_MAN_tbl): $(_MANDIR)/%.tbl: $(MANDIR)/% $(MK) | $$(@D)/
+$(_MAN_tbl): %.tbl: % $(MK) | $$(@D)/
$(info $(INFO_)PRECONV $@)
$(PRECONV) $(PRECONVFLAGS) $< >$@
diff --git a/share/mk/build/pre/tbl.mk b/share/mk/build/pre/tbl.mk
index 24486f8..0deb42e 100644
--- a/share/mk/build/pre/tbl.mk
+++ b/share/mk/build/pre/tbl.mk
@@ -7,7 +7,7 @@ MAKEFILE_BUILD_PRE_TBL_INCLUDED := 1
include $(MAKEFILEDIR)/build/pre/preconv.mk
-include $(MAKEFILEDIR)/configure/build-depends/groff-base.mk
+include $(MAKEFILEDIR)/configure/build-depends/groff-base/tbl.mk
_MAN_eqn := $(patsubst %.tbl,%.eqn,$(_MAN_tbl))
diff --git a/share/mk/build/ps/eqn.mk b/share/mk/build/ps/eqn.mk
index a4c921e..c88b202 100644
--- a/share/mk/build/ps/eqn.mk
+++ b/share/mk/build/ps/eqn.mk
@@ -7,8 +7,8 @@ MAKEFILE_BUILD_PS_EQN_INCLUDED := 1
include $(MAKEFILEDIR)/build/pre/tbl.mk
-include $(MAKEFILEDIR)/configure/build-depends/grep.mk
-include $(MAKEFILEDIR)/configure/build-depends/groff-base.mk
+include $(MAKEFILEDIR)/configure/build-depends/grep/grep.mk
+include $(MAKEFILEDIR)/configure/build-depends/groff-base/eqn.mk
_PSMAN_troff := $(patsubst %.eqn,%.ps.troff,$(_MAN_eqn))
diff --git a/share/mk/build/ps/grops.mk b/share/mk/build/ps/grops.mk
index cca9b44..fae11e1 100644
--- a/share/mk/build/ps/grops.mk
+++ b/share/mk/build/ps/grops.mk
@@ -7,10 +7,10 @@ MAKEFILE_BUILD_PS_GROPS_INCLUDED := 1
include $(MAKEFILEDIR)/build/ps/troff.mk
-include $(MAKEFILEDIR)/configure/build-depends/groff-base.mk
+include $(MAKEFILEDIR)/configure/build-depends/groff-base/grops.mk
-_PSMAN := $(patsubst %.ps.set,%.ps,$(_PSMAN_MAN_set) $(_PSMAN_MDOC_set))
+_PSMAN := $(patsubst %.ps.set, %.ps, $(_PSMAN_MAN_set) $(_PSMAN_MDOC_set))
$(_PSMAN): %.ps: %.ps.set $(MK) | $$(@D)/
diff --git a/share/mk/build/ps/troff.mk b/share/mk/build/ps/troff.mk
index 1492821..f56783b 100644
--- a/share/mk/build/ps/troff.mk
+++ b/share/mk/build/ps/troff.mk
@@ -7,16 +7,18 @@ MAKEFILE_BUILD_PS_TROFF_INCLUDED := 1
include $(MAKEFILEDIR)/build/_.mk
-include $(MAKEFILEDIR)/configure/build-depends/grep.mk
-include $(MAKEFILEDIR)/configure/build-depends/groff-base.mk
-include $(MAKEFILEDIR)/configure/src.mk
+include $(MAKEFILEDIR)/build/man/man.mk
+include $(MAKEFILEDIR)/build/man/mdoc.mk
+include $(MAKEFILEDIR)/configure/build-depends/grep/grep.mk
+include $(MAKEFILEDIR)/configure/build-depends/groff-base/troff.mk
include $(MAKEFILEDIR)/configure/xfail.mk
-include $(MAKEFILEDIR)/src.mk
_XFAIL_PSMAN_MAN_set := \
$(_MANDIR)/man1/iconv.1.ps.set \
$(_MANDIR)/man2/fanotify_init.2.ps.set \
+ $(_MANDIR)/man2/membarrier.2.ps.set \
+ $(_MANDIR)/man2/statx.2.ps.set \
$(_MANDIR)/man2/syscall.2.ps.set \
$(_MANDIR)/man3/newlocale.3.ps.set \
$(_MANDIR)/man7/address_families.7.ps.set \
@@ -42,8 +44,8 @@ _XFAIL_PSMAN_MAN_set := \
$(_MANDIR)/man7/vdso.7.ps.set
-_PSMAN_MAN_set := $(patsubst $(MANDIR)/%,$(_MANDIR)/%.ps.set,$(NONSO_MAN))
-_PSMAN_MDOC_set:= $(patsubst $(MANDIR)/%,$(_MANDIR)/%.ps.set,$(NONSO_MDOC))
+_PSMAN_MAN_set := $(patsubst %, %.ps.set, $(_NONSO_MAN))
+_PSMAN_MDOC_set := $(patsubst %, %.ps.set, $(_NONSO_MDOC))
ifeq ($(SKIP_XFAIL),yes)
diff --git a/share/mk/check/catman/col.mk b/share/mk/check/catman/col.mk
index 59104fa..b1d6a1a 100644
--- a/share/mk/check/catman/col.mk
+++ b/share/mk/check/catman/col.mk
@@ -7,10 +7,10 @@ MAKEFILE_CHECK_CATMAN_COL_INCLUDED := 1
include $(MAKEFILEDIR)/build/catman/grotty.mk
-include $(MAKEFILEDIR)/configure/build-depends/bsdextrautils.mk
+include $(MAKEFILEDIR)/configure/build-depends/bsdextrautils/col.mk
-_CHECK_catman_grep := $(patsubst %.cat,%.cat.grep,$(_CATMAN))
+_CHECK_catman_grep := $(patsubst %.cat, %.cat.grep, $(_CATMAN))
$(_CHECK_catman_grep): %.grep: % $(MK) | $$(@D)/
diff --git a/share/mk/check/catman/grep.mk b/share/mk/check/catman/grep.mk
index fbf99bc..1563547 100644
--- a/share/mk/check/catman/grep.mk
+++ b/share/mk/check/catman/grep.mk
@@ -7,9 +7,9 @@ MAKEFILE_CHECK_CATMAN_GREP_INCLUDED := 1
include $(MAKEFILEDIR)/build/_.mk
-include $(MAKEFILEDIR)/configure/build-depends/coreutils.mk
-include $(MAKEFILEDIR)/configure/build-depends/grep.mk
-include $(MAKEFILEDIR)/configure/build-depends/man.mk
+include $(MAKEFILEDIR)/configure/build-depends/coreutils/touch.mk
+include $(MAKEFILEDIR)/configure/build-depends/grep/grep.mk
+include $(MAKEFILEDIR)/configure/build-depends/man/man.mk
include $(MAKEFILEDIR)/configure/xfail.mk
@@ -31,7 +31,7 @@ _XFAIL_CHECK_catman := \
$(_MANDIR)/man7/uri.7.check-catman.touch
-_CHECK_catman := $(patsubst %.cat.grep,%.check-catman.touch,$(_CHECK_catman_grep))
+_CHECK_catman := $(patsubst %.cat.grep, %.check-catman.touch, $(_CHECK_catman_grep))
ifeq ($(SKIP_XFAIL),yes)
_CHECK_catman := $(filter-out $(_XFAIL_CHECK_catman), $(_CHECK_catman))
endif
diff --git a/share/mk/clean.mk b/share/mk/clean.mk
index a0908fa..785768b 100644
--- a/share/mk/clean.mk
+++ b/share/mk/clean.mk
@@ -6,8 +6,8 @@ ifndef MAKEFILE_CLEAN_INCLUDED
MAKEFILE_CLEAN_INCLUDED := 1
-include $(MAKEFILEDIR)/configure/build-depends/coreutils.mk
-include $(MAKEFILEDIR)/configure/directory_variables.mk
+include $(MAKEFILEDIR)/configure/build-depends/coreutils/rm.mk
+include $(MAKEFILEDIR)/configure/directory_variables/build.mk
.PHONY: clean
diff --git a/share/mk/configure/build-depends/ld.mk b/share/mk/configure/build-depends/binutils/ld.mk
index a78a189..687039f 100644
--- a/share/mk/configure/build-depends/ld.mk
+++ b/share/mk/configure/build-depends/binutils/ld.mk
@@ -2,17 +2,18 @@
# SPDX-License-Identifier: LGPL-3.0-only WITH LGPL-3.0-linking-exception
-ifndef MAKEFILE_CONFIGURE_BUILD_DEPENDS_LD_INCLUDED
-MAKEFILE_CONFIGURE_BUILD_DEPENDS_LD_INCLUDED := 1
+ifndef MAKEFILE_CONFIGURE_BUILD_DEPENDS_BINUTILS_LD_INCLUDED
+MAKEFILE_CONFIGURE_BUILD_DEPENDS_BINUTILS_LD_INCLUDED := 1
-include $(MAKEFILEDIR)/configure/build-depends/cc.mk
-include $(MAKEFILEDIR)/configure/build-depends/coreutils.mk
-include $(MAKEFILEDIR)/configure/build-depends/pkgconf.mk
+include $(MAKEFILEDIR)/configure/build-depends/cpp/cpp.mk
+include $(MAKEFILEDIR)/configure/build-depends/gcc/cc.mk
+include $(MAKEFILEDIR)/configure/build-depends/coreutils/echo.mk
+include $(MAKEFILEDIR)/configure/build-depends/pkgconf/pkgconf.mk
include $(MAKEFILEDIR)/configure/verbose.mk
-LD := $(CC) $(CFLAGS)
+LD := $(CC) $(CPPFLAGS) $(CFLAGS)
LD_HAS_FUSE_LINKER_PLUGIN := \
diff --git a/share/mk/configure/build-depends/bsdextrautils.mk b/share/mk/configure/build-depends/bsdextrautils/col.mk
index 347e4bc..d7aeca2 100644
--- a/share/mk/configure/build-depends/bsdextrautils.mk
+++ b/share/mk/configure/build-depends/bsdextrautils/col.mk
@@ -2,8 +2,8 @@
# SPDX-License-Identifier: LGPL-3.0-only WITH LGPL-3.0-linking-exception
-ifndef MAKEFILE_CONFIGURE_BUILD_DEPENDS_BSDEXTRAUTILS_INCLUDED
-MAKEFILE_CONFIGURE_BUILD_DEPENDS_BSDEXTRAUTILS_INCLUDED := 1
+ifndef MAKEFILE_CONFIGURE_BUILD_DEPENDS_BSDEXTRAUTILS_COL_INCLUDED
+MAKEFILE_CONFIGURE_BUILD_DEPENDS_BSDEXTRAUTILS_COL_INCLUDED := 1
DEFAULT_COLFLAGS := \
diff --git a/share/mk/configure/build-depends/bzip2.mk b/share/mk/configure/build-depends/bzip2/bzip2.mk
index 71e6366..ccc241a 100644
--- a/share/mk/configure/build-depends/bzip2.mk
+++ b/share/mk/configure/build-depends/bzip2/bzip2.mk
@@ -2,8 +2,8 @@
# SPDX-License-Identifier: LGPL-3.0-only WITH LGPL-3.0-linking-exception
-ifndef MAKEFILE_CONFIGURE_BUILD_DEPENDS_BZIP2_INCLUDED
-MAKEFILE_CONFIGURE_BUILD_DEPENDS_BZIP2_INCLUDED := 1
+ifndef MAKEFILE_CONFIGURE_BUILD_DEPENDS_BZIP2_BZIP2_INCLUDED
+MAKEFILE_CONFIGURE_BUILD_DEPENDS_BZIP2_BZIP2_INCLUDED := 1
DEFAULT_BZIP2FLAGS :=
diff --git a/share/mk/configure/build-depends/checkpatch.mk b/share/mk/configure/build-depends/checkpatch/checkpatch.mk
index 0b29d9f..7100411 100644
--- a/share/mk/configure/build-depends/checkpatch.mk
+++ b/share/mk/configure/build-depends/checkpatch/checkpatch.mk
@@ -2,11 +2,11 @@
# SPDX-License-Identifier: LGPL-3.0-only WITH LGPL-3.0-linking-exception
-ifndef MAKEFILE_CONFIGURE_BUILD_DEPENDS_CHECKPATCH_INCLUDED
-MAKEFILE_CONFIGURE_BUILD_DEPENDS_CHECKPATCH_INCLUDED := 1
+ifndef MAKEFILE_CONFIGURE_BUILD_DEPENDS_CHECKPATCH_CHECKPATCH_INCLUDED
+MAKEFILE_CONFIGURE_BUILD_DEPENDS_CHECKPATCH_CHECKPATCH_INCLUDED := 1
-include $(MAKEFILEDIR)/configure/src.mk
+include $(MAKEFILEDIR)/configure/directory_variables/src.mk
CHECKPATCH_CONF := $(SYSCONFDIR)/checkpatch/checkpatch.conf
diff --git a/share/mk/configure/build-depends/clang-tidy.mk b/share/mk/configure/build-depends/clang-tidy/clang-tidy.mk
index 2d818f9..809215d 100644
--- a/share/mk/configure/build-depends/clang-tidy.mk
+++ b/share/mk/configure/build-depends/clang-tidy/clang-tidy.mk
@@ -2,11 +2,11 @@
# SPDX-License-Identifier: LGPL-3.0-only WITH LGPL-3.0-linking-exception
-ifndef MAKEFILE_CONFIGURE_BUILD_DEPENDS_CLANG_TIDY_INCLUDED
-MAKEFILE_CONFIGURE_BUILD_DEPENDS_CLANG_TIDY_INCLUDED := 1
+ifndef MAKEFILE_CONFIGURE_BUILD_DEPENDS_CLANG_TIDY_CLANG_TIDY_INCLUDED
+MAKEFILE_CONFIGURE_BUILD_DEPENDS_CLANG_TIDY_CLANG_TIDY_INCLUDED := 1
-include $(MAKEFILEDIR)/configure/src.mk
+include $(MAKEFILEDIR)/configure/directory_variables/src.mk
CLANG_TIDY_CONF := $(SYSCONFDIR)/clang-tidy/config.yaml
diff --git a/share/mk/configure/build-depends/clang.mk b/share/mk/configure/build-depends/clang/clang.mk
index b44ccb5..edb1254 100644
--- a/share/mk/configure/build-depends/clang.mk
+++ b/share/mk/configure/build-depends/clang/clang.mk
@@ -2,11 +2,11 @@
# SPDX-License-Identifier: LGPL-3.0-only WITH LGPL-3.0-linking-exception
-ifndef MAKEFILE_CONFIGURE_BUILD_DEPENDS_CLANG_INCLUDED
-MAKEFILE_CONFIGURE_BUILD_DEPENDS_CLANG_INCLUDED := 1
+ifndef MAKEFILE_CONFIGURE_BUILD_DEPENDS_CLANG_CLANG_INCLUDED
+MAKEFILE_CONFIGURE_BUILD_DEPENDS_CLANG_CLANG_INCLUDED := 1
-include $(MAKEFILEDIR)/configure/build-depends/cc.mk
+include $(MAKEFILEDIR)/configure/build-depends/gcc/cc.mk
DEFAULT_CLANGFLAGS := \
diff --git a/share/mk/configure/build-depends/coreutils.mk b/share/mk/configure/build-depends/coreutils.mk
deleted file mode 100644
index 2fe97fe..0000000
--- a/share/mk/configure/build-depends/coreutils.mk
+++ /dev/null
@@ -1,32 +0,0 @@
-# Copyright 2022-2024, Alejandro Colomar <alx@kernel.org>
-# SPDX-License-Identifier: LGPL-3.0-only WITH LGPL-3.0-linking-exception
-
-
-ifndef MAKEFILE_CONFIGURE_BUILD_DEPENDS_COREUTILS_INCLUDED
-MAKEFILE_CONFIGURE_BUILD_DEPENDS_COREUTILS_INCLUDED := 1
-
-
-CAT := cat
-CP := cp
-ECHO := echo
-EXPR := expr
-HEAD := head
-INSTALL := install
-LN := ln
-MKDIR := mkdir
-REALPATH := realpath
-RM := rm
-SORT := sort
-STAT := stat
-TAC := tac
-TAIL := tail
-TEST := test
-TOUCH := touch
-TRUE := true
-
-
-INSTALL_DATA := $(INSTALL) -m 644
-INSTALL_DIR := $(INSTALL) -m 755 -d
-
-
-endif # include guard
diff --git a/share/mk/configure/build-depends/findutils.mk b/share/mk/configure/build-depends/coreutils/cat.mk
index 536f921..fa96595 100644
--- a/share/mk/configure/build-depends/findutils.mk
+++ b/share/mk/configure/build-depends/coreutils/cat.mk
@@ -2,12 +2,11 @@
# SPDX-License-Identifier: LGPL-3.0-only WITH LGPL-3.0-linking-exception
-ifndef MAKEFILE_CONFIGURE_BUILD_DEPENDS_FINDUTILS_INCLUDED
-MAKEFILE_CONFIGURE_BUILD_DEPENDS_FINDUTILS_INCLUDED := 1
+ifndef MAKEFILE_CONFIGURE_BUILD_DEPENDS_COREUTILS_CAT_INCLUDED
+MAKEFILE_CONFIGURE_BUILD_DEPENDS_COREUTILS_CAT_INCLUDED := 1
-FIND := find
-XARGS := xargs
+CAT := cat
endif # include guard
diff --git a/share/mk/configure/build-depends/coreutils/cp.mk b/share/mk/configure/build-depends/coreutils/cp.mk
new file mode 100644
index 0000000..64814dc
--- /dev/null
+++ b/share/mk/configure/build-depends/coreutils/cp.mk
@@ -0,0 +1,12 @@
+# Copyright 2022-2024, Alejandro Colomar <alx@kernel.org>
+# SPDX-License-Identifier: LGPL-3.0-only WITH LGPL-3.0-linking-exception
+
+
+ifndef MAKEFILE_CONFIGURE_BUILD_DEPENDS_COREUTILS_CP_INCLUDED
+MAKEFILE_CONFIGURE_BUILD_DEPENDS_COREUTILS_CP_INCLUDED := 1
+
+
+CP := cp
+
+
+endif # include guard
diff --git a/share/mk/configure/build-depends/coreutils/echo.mk b/share/mk/configure/build-depends/coreutils/echo.mk
new file mode 100644
index 0000000..272d86c
--- /dev/null
+++ b/share/mk/configure/build-depends/coreutils/echo.mk
@@ -0,0 +1,12 @@
+# Copyright 2022-2024, Alejandro Colomar <alx@kernel.org>
+# SPDX-License-Identifier: LGPL-3.0-only WITH LGPL-3.0-linking-exception
+
+
+ifndef MAKEFILE_CONFIGURE_BUILD_DEPENDS_COREUTILS_ECHO_INCLUDED
+MAKEFILE_CONFIGURE_BUILD_DEPENDS_COREUTILS_ECHO_INCLUDED := 1
+
+
+ECHO := echo
+
+
+endif # include guard
diff --git a/share/mk/configure/build-depends/coreutils/expr.mk b/share/mk/configure/build-depends/coreutils/expr.mk
new file mode 100644
index 0000000..18ca0e1
--- /dev/null
+++ b/share/mk/configure/build-depends/coreutils/expr.mk
@@ -0,0 +1,12 @@
+# Copyright 2022-2024, Alejandro Colomar <alx@kernel.org>
+# SPDX-License-Identifier: LGPL-3.0-only WITH LGPL-3.0-linking-exception
+
+
+ifndef MAKEFILE_CONFIGURE_BUILD_DEPENDS_COREUTILS_EXPR_INCLUDED
+MAKEFILE_CONFIGURE_BUILD_DEPENDS_COREUTILS_EXPR_INCLUDED := 1
+
+
+EXPR := expr
+
+
+endif # include guard
diff --git a/share/mk/configure/build-depends/coreutils/head.mk b/share/mk/configure/build-depends/coreutils/head.mk
new file mode 100644
index 0000000..a3fbb3e
--- /dev/null
+++ b/share/mk/configure/build-depends/coreutils/head.mk
@@ -0,0 +1,12 @@
+# Copyright 2022-2024, Alejandro Colomar <alx@kernel.org>
+# SPDX-License-Identifier: LGPL-3.0-only WITH LGPL-3.0-linking-exception
+
+
+ifndef MAKEFILE_CONFIGURE_BUILD_DEPENDS_COREUTILS_HEAD_INCLUDED
+MAKEFILE_CONFIGURE_BUILD_DEPENDS_COREUTILS_HEAD_INCLUDED := 1
+
+
+HEAD := head
+
+
+endif # include guard
diff --git a/share/mk/configure/build-depends/coreutils/install.mk b/share/mk/configure/build-depends/coreutils/install.mk
new file mode 100644
index 0000000..ab7dbef
--- /dev/null
+++ b/share/mk/configure/build-depends/coreutils/install.mk
@@ -0,0 +1,16 @@
+# Copyright 2022-2024, Alejandro Colomar <alx@kernel.org>
+# SPDX-License-Identifier: LGPL-3.0-only WITH LGPL-3.0-linking-exception
+
+
+ifndef MAKEFILE_CONFIGURE_BUILD_DEPENDS_COREUTILS_INSTALL_INCLUDED
+MAKEFILE_CONFIGURE_BUILD_DEPENDS_COREUTILS_INSTALL_INCLUDED := 1
+
+
+INSTALL := install
+
+
+INSTALL_DATA := $(INSTALL) -m 644
+INSTALL_DIR := $(INSTALL) -m 755 -d
+
+
+endif # include guard
diff --git a/share/mk/configure/build-depends/coreutils/ln.mk b/share/mk/configure/build-depends/coreutils/ln.mk
new file mode 100644
index 0000000..a520de7
--- /dev/null
+++ b/share/mk/configure/build-depends/coreutils/ln.mk
@@ -0,0 +1,12 @@
+# Copyright 2022-2024, Alejandro Colomar <alx@kernel.org>
+# SPDX-License-Identifier: LGPL-3.0-only WITH LGPL-3.0-linking-exception
+
+
+ifndef MAKEFILE_CONFIGURE_BUILD_DEPENDS_COREUTILS_LN_INCLUDED
+MAKEFILE_CONFIGURE_BUILD_DEPENDS_COREUTILS_LN_INCLUDED := 1
+
+
+LN := ln
+
+
+endif # include guard
diff --git a/share/mk/configure/build-depends/coreutils/mkdir.mk b/share/mk/configure/build-depends/coreutils/mkdir.mk
new file mode 100644
index 0000000..77def5d
--- /dev/null
+++ b/share/mk/configure/build-depends/coreutils/mkdir.mk
@@ -0,0 +1,12 @@
+# Copyright 2022-2024, Alejandro Colomar <alx@kernel.org>
+# SPDX-License-Identifier: LGPL-3.0-only WITH LGPL-3.0-linking-exception
+
+
+ifndef MAKEFILE_CONFIGURE_BUILD_DEPENDS_COREUTILS_MKDIR_INCLUDED
+MAKEFILE_CONFIGURE_BUILD_DEPENDS_COREUTILS_MKDIR_INCLUDED := 1
+
+
+MKDIR := mkdir
+
+
+endif # include guard
diff --git a/share/mk/configure/build-depends/coreutils/realpath.mk b/share/mk/configure/build-depends/coreutils/realpath.mk
new file mode 100644
index 0000000..7883f97
--- /dev/null
+++ b/share/mk/configure/build-depends/coreutils/realpath.mk
@@ -0,0 +1,12 @@
+# Copyright 2022-2024, Alejandro Colomar <alx@kernel.org>
+# SPDX-License-Identifier: LGPL-3.0-only WITH LGPL-3.0-linking-exception
+
+
+ifndef MAKEFILE_CONFIGURE_BUILD_DEPENDS_COREUTILS_REALPATH_INCLUDED
+MAKEFILE_CONFIGURE_BUILD_DEPENDS_COREUTILS_REALPATH_INCLUDED := 1
+
+
+REALPATH := realpath
+
+
+endif # include guard
diff --git a/share/mk/configure/build-depends/coreutils/rm.mk b/share/mk/configure/build-depends/coreutils/rm.mk
new file mode 100644
index 0000000..3c26518
--- /dev/null
+++ b/share/mk/configure/build-depends/coreutils/rm.mk
@@ -0,0 +1,12 @@
+# Copyright 2022-2024, Alejandro Colomar <alx@kernel.org>
+# SPDX-License-Identifier: LGPL-3.0-only WITH LGPL-3.0-linking-exception
+
+
+ifndef MAKEFILE_CONFIGURE_BUILD_DEPENDS_COREUTILS_RM_INCLUDED
+MAKEFILE_CONFIGURE_BUILD_DEPENDS_COREUTILS_RM_INCLUDED := 1
+
+
+RM := rm
+
+
+endif # include guard
diff --git a/share/mk/configure/build-depends/coreutils/sort.mk b/share/mk/configure/build-depends/coreutils/sort.mk
new file mode 100644
index 0000000..4871d54
--- /dev/null
+++ b/share/mk/configure/build-depends/coreutils/sort.mk
@@ -0,0 +1,12 @@
+# Copyright 2022-2024, Alejandro Colomar <alx@kernel.org>
+# SPDX-License-Identifier: LGPL-3.0-only WITH LGPL-3.0-linking-exception
+
+
+ifndef MAKEFILE_CONFIGURE_BUILD_DEPENDS_COREUTILS_SORT_INCLUDED
+MAKEFILE_CONFIGURE_BUILD_DEPENDS_COREUTILS_SORT_INCLUDED := 1
+
+
+SORT := sort
+
+
+endif # include guard
diff --git a/share/mk/configure/build-depends/coreutils/stat.mk b/share/mk/configure/build-depends/coreutils/stat.mk
new file mode 100644
index 0000000..a04c956
--- /dev/null
+++ b/share/mk/configure/build-depends/coreutils/stat.mk
@@ -0,0 +1,12 @@
+# Copyright 2022-2024, Alejandro Colomar <alx@kernel.org>
+# SPDX-License-Identifier: LGPL-3.0-only WITH LGPL-3.0-linking-exception
+
+
+ifndef MAKEFILE_CONFIGURE_BUILD_DEPENDS_COREUTILS_STAT_INCLUDED
+MAKEFILE_CONFIGURE_BUILD_DEPENDS_COREUTILS_STAT_INCLUDED := 1
+
+
+STAT := stat
+
+
+endif # include guard
diff --git a/share/mk/configure/build-depends/coreutils/tac.mk b/share/mk/configure/build-depends/coreutils/tac.mk
new file mode 100644
index 0000000..2ad296a
--- /dev/null
+++ b/share/mk/configure/build-depends/coreutils/tac.mk
@@ -0,0 +1,12 @@
+# Copyright 2022-2024, Alejandro Colomar <alx@kernel.org>
+# SPDX-License-Identifier: LGPL-3.0-only WITH LGPL-3.0-linking-exception
+
+
+ifndef MAKEFILE_CONFIGURE_BUILD_DEPENDS_COREUTILS_TAC_INCLUDED
+MAKEFILE_CONFIGURE_BUILD_DEPENDS_COREUTILS_TAC_INCLUDED := 1
+
+
+TAC := tac
+
+
+endif # include guard
diff --git a/share/mk/configure/build-depends/coreutils/tail.mk b/share/mk/configure/build-depends/coreutils/tail.mk
new file mode 100644
index 0000000..514391e
--- /dev/null
+++ b/share/mk/configure/build-depends/coreutils/tail.mk
@@ -0,0 +1,12 @@
+# Copyright 2022-2024, Alejandro Colomar <alx@kernel.org>
+# SPDX-License-Identifier: LGPL-3.0-only WITH LGPL-3.0-linking-exception
+
+
+ifndef MAKEFILE_CONFIGURE_BUILD_DEPENDS_COREUTILS_TAIL_INCLUDED
+MAKEFILE_CONFIGURE_BUILD_DEPENDS_COREUTILS_TAIL_INCLUDED := 1
+
+
+TAIL := tail
+
+
+endif # include guard
diff --git a/share/mk/configure/build-depends/coreutils/test.mk b/share/mk/configure/build-depends/coreutils/test.mk
new file mode 100644
index 0000000..1343fa6
--- /dev/null
+++ b/share/mk/configure/build-depends/coreutils/test.mk
@@ -0,0 +1,12 @@
+# Copyright 2022-2024, Alejandro Colomar <alx@kernel.org>
+# SPDX-License-Identifier: LGPL-3.0-only WITH LGPL-3.0-linking-exception
+
+
+ifndef MAKEFILE_CONFIGURE_BUILD_DEPENDS_COREUTILS_TEST_INCLUDED
+MAKEFILE_CONFIGURE_BUILD_DEPENDS_COREUTILS_TEST_INCLUDED := 1
+
+
+TEST := test
+
+
+endif # include guard
diff --git a/share/mk/configure/build-depends/coreutils/touch.mk b/share/mk/configure/build-depends/coreutils/touch.mk
new file mode 100644
index 0000000..2db533a
--- /dev/null
+++ b/share/mk/configure/build-depends/coreutils/touch.mk
@@ -0,0 +1,12 @@
+# Copyright 2022-2024, Alejandro Colomar <alx@kernel.org>
+# SPDX-License-Identifier: LGPL-3.0-only WITH LGPL-3.0-linking-exception
+
+
+ifndef MAKEFILE_CONFIGURE_BUILD_DEPENDS_COREUTILS_TOUCH_INCLUDED
+MAKEFILE_CONFIGURE_BUILD_DEPENDS_COREUTILS_TOUCH_INCLUDED := 1
+
+
+TOUCH := touch
+
+
+endif # include guard
diff --git a/share/mk/configure/build-depends/coreutils/true.mk b/share/mk/configure/build-depends/coreutils/true.mk
new file mode 100644
index 0000000..2295c2f
--- /dev/null
+++ b/share/mk/configure/build-depends/coreutils/true.mk
@@ -0,0 +1,12 @@
+# Copyright 2022-2024, Alejandro Colomar <alx@kernel.org>
+# SPDX-License-Identifier: LGPL-3.0-only WITH LGPL-3.0-linking-exception
+
+
+ifndef MAKEFILE_CONFIGURE_BUILD_DEPENDS_COREUTILS_TRUE_INCLUDED
+MAKEFILE_CONFIGURE_BUILD_DEPENDS_COREUTILS_TRUE_INCLUDED := 1
+
+
+TRUE := true
+
+
+endif # include guard
diff --git a/share/mk/configure/build-depends/cpp.mk b/share/mk/configure/build-depends/cpp/cpp.mk
index b720898..e1e2511 100644
--- a/share/mk/configure/build-depends/cpp.mk
+++ b/share/mk/configure/build-depends/cpp/cpp.mk
@@ -2,12 +2,12 @@
# SPDX-License-Identifier: LGPL-3.0-only WITH LGPL-3.0-linking-exception
-ifndef MAKEFILE_CONFIGURE_BUILD_DEPENDS_CPP_INCLUDED
-MAKEFILE_CONFIGURE_BUILD_DEPENDS_CPP_INCLUDED := 1
+ifndef MAKEFILE_CONFIGURE_BUILD_DEPENDS_CPP_CPP_INCLUDED
+MAKEFILE_CONFIGURE_BUILD_DEPENDS_CPP_CPP_INCLUDED := 1
-include $(MAKEFILEDIR)/configure/build-depends/cc.mk
-include $(MAKEFILEDIR)/configure/build-depends/pkgconf.mk
+include $(MAKEFILEDIR)/configure/build-depends/gcc/cc.mk
+include $(MAKEFILEDIR)/configure/build-depends/pkgconf/pkgconf.mk
include $(MAKEFILEDIR)/configure/verbose.mk
diff --git a/share/mk/configure/build-depends/cppcheck.mk b/share/mk/configure/build-depends/cppcheck/cppcheck.mk
index 93a9b75..2a5d844 100644
--- a/share/mk/configure/build-depends/cppcheck.mk
+++ b/share/mk/configure/build-depends/cppcheck/cppcheck.mk
@@ -2,11 +2,11 @@
# SPDX-License-Identifier: LGPL-3.0-only WITH LGPL-3.0-linking-exception
-ifndef MAKEFILE_CONFIGURE_BUILD_DEPENDS_CPPCHECK_INCLUDED
-MAKEFILE_CONFIGURE_BUILD_DEPENDS_CPPCHECK_INCLUDED := 1
+ifndef MAKEFILE_CONFIGURE_BUILD_DEPENDS_CPPCHECK_CPPCHECK_INCLUDED
+MAKEFILE_CONFIGURE_BUILD_DEPENDS_CPPCHECK_CPPCHECK_INCLUDED := 1
-include $(MAKEFILEDIR)/configure/src.mk
+include $(MAKEFILEDIR)/configure/directory_variables/src.mk
CPPCHECK_SUPPRESS := $(SYSCONFDIR)/cppcheck/cppcheck.suppress
@@ -14,6 +14,7 @@ DEFAULT_CPPCHECKFLAGS := \
--enable=all \
--error-exitcode=2 \
--inconclusive \
+ --check-level=exhaustive \
--quiet \
--suppressions-list=$(CPPCHECK_SUPPRESS)
EXTRA_CPPCHECKFLAGS :=
diff --git a/share/mk/configure/build-depends/cpplint.mk b/share/mk/configure/build-depends/cpplint/cpplint.mk
index 586d646..330315f 100644
--- a/share/mk/configure/build-depends/cpplint.mk
+++ b/share/mk/configure/build-depends/cpplint/cpplint.mk
@@ -2,11 +2,11 @@
# SPDX-License-Identifier: LGPL-3.0-only WITH LGPL-3.0-linking-exception
-ifndef MAKEFILE_CONFIGURE_BUILD_DEPENDS_CPPLINT_INCLUDED
-MAKEFILE_CONFIGURE_BUILD_DEPENDS_CPPLINT_INCLUDED := 1
+ifndef MAKEFILE_CONFIGURE_BUILD_DEPENDS_CPPLINT_CPPLINT_INCLUDED
+MAKEFILE_CONFIGURE_BUILD_DEPENDS_CPPLINT_CPPLINT_INCLUDED := 1
-include $(MAKEFILEDIR)/configure/src.mk
+include $(MAKEFILEDIR)/configure/directory_variables/src.mk
CPPLINT_CONF := $(SYSCONFDIR)/cpplint/cpplint.cfg
diff --git a/share/mk/configure/build-depends/diffoscope.mk b/share/mk/configure/build-depends/diffoscope/diffoscope.mk
index a9e48b3..032a0c6 100644
--- a/share/mk/configure/build-depends/diffoscope.mk
+++ b/share/mk/configure/build-depends/diffoscope/diffoscope.mk
@@ -2,8 +2,8 @@
# SPDX-License-Identifier: LGPL-3.0-only WITH LGPL-3.0-linking-exception
-ifndef MAKEFILE_CONFIGURE_BUILD_DEPENDS_DIFFOSCOPE_INCLUDED
-MAKEFILE_CONFIGURE_BUILD_DEPENDS_DIFFOSCOPE_INCLUDED := 1
+ifndef MAKEFILE_CONFIGURE_BUILD_DEPENDS_DIFFOSCOPE_DIFFOSCOPE_INCLUDED
+MAKEFILE_CONFIGURE_BUILD_DEPENDS_DIFFOSCOPE_DIFFOSCOPE_INCLUDED := 1
DIFFOSCOPE := diffoscope
diff --git a/share/mk/configure/build-depends/findutils/find.mk b/share/mk/configure/build-depends/findutils/find.mk
new file mode 100644
index 0000000..1525f0e
--- /dev/null
+++ b/share/mk/configure/build-depends/findutils/find.mk
@@ -0,0 +1,12 @@
+# Copyright 2022-2024, Alejandro Colomar <alx@kernel.org>
+# SPDX-License-Identifier: LGPL-3.0-only WITH LGPL-3.0-linking-exception
+
+
+ifndef MAKEFILE_CONFIGURE_BUILD_DEPENDS_FINDUTILS_FIND_INCLUDED
+MAKEFILE_CONFIGURE_BUILD_DEPENDS_FINDUTILS_FIND_INCLUDED := 1
+
+
+FIND := find
+
+
+endif # include guard
diff --git a/share/mk/configure/build-depends/findutils/xargs.mk b/share/mk/configure/build-depends/findutils/xargs.mk
new file mode 100644
index 0000000..dffa009
--- /dev/null
+++ b/share/mk/configure/build-depends/findutils/xargs.mk
@@ -0,0 +1,12 @@
+# Copyright 2022-2024, Alejandro Colomar <alx@kernel.org>
+# SPDX-License-Identifier: LGPL-3.0-only WITH LGPL-3.0-linking-exception
+
+
+ifndef MAKEFILE_CONFIGURE_BUILD_DEPENDS_FINDUTILS_XARGS_INCLUDED
+MAKEFILE_CONFIGURE_BUILD_DEPENDS_FINDUTILS_XARGS_INCLUDED := 1
+
+
+XARGS := xargs
+
+
+endif # include guard
diff --git a/share/mk/configure/build-depends/fontforge/fontforge.mk b/share/mk/configure/build-depends/fontforge/fontforge.mk
new file mode 100644
index 0000000..f246df2
--- /dev/null
+++ b/share/mk/configure/build-depends/fontforge/fontforge.mk
@@ -0,0 +1,15 @@
+# Copyright 2024, Alejandro Colomar <alx@kernel.org>
+# SPDX-License-Identifier: LGPL-3.0-only WITH LGPL-3.0-linking-exception
+
+
+ifndef MAKEFILE_CONFIGURE_BUILD_DEPENDS_FONTFORGE_FONTFORGE_INCLUDED
+MAKEFILE_CONFIGURE_BUILD_DEPENDS_FONTFORGE_FONTFORGE_INCLUDED := 1
+
+
+DEFAULT_FONTFORGEFLAGS :=
+EXTRA_FONTFORGEFLAGS :=
+FONTFORGEFLAGS := $(DEFAULT_FONTFORGEFLAGS) $(EXTRA_FONTFORGEFLAGS)
+FONTFORGE := fontforge
+
+
+endif # include guard
diff --git a/share/mk/configure/build-depends/cc.mk b/share/mk/configure/build-depends/gcc/cc.mk
index 85470a4..9481865 100644
--- a/share/mk/configure/build-depends/cc.mk
+++ b/share/mk/configure/build-depends/gcc/cc.mk
@@ -2,13 +2,13 @@
# SPDX-License-Identifier: LGPL-3.0-only WITH LGPL-3.0-linking-exception
-ifndef MAKEFILE_CONFIGURE_BUILD_DEPENDS_CC_INCLUDED
-MAKEFILE_CONFIGURE_BUILD_DEPENDS_CC_INCLUDED := 1
+ifndef MAKEFILE_CONFIGURE_BUILD_DEPENDS_GCC_CC_INCLUDED
+MAKEFILE_CONFIGURE_BUILD_DEPENDS_GCC_CC_INCLUDED := 1
-include $(MAKEFILEDIR)/configure/build-depends/coreutils.mk
-include $(MAKEFILEDIR)/configure/build-depends/grep.mk
-include $(MAKEFILEDIR)/configure/build-depends/sed.mk
+include $(MAKEFILEDIR)/configure/build-depends/coreutils/echo.mk
+include $(MAKEFILEDIR)/configure/build-depends/grep/grep.mk
+include $(MAKEFILEDIR)/configure/build-depends/sed/sed.mk
CC := gcc
@@ -34,6 +34,8 @@ COMMON_CFLAGS := \
-Werror \
-Wstrict-prototypes \
-Wdeclaration-after-statement \
+ -Wno-reserved-identifier \
+ -Wno-unused-macros \
-Wno-error=unused-parameter \
-Wno-error=sign-compare \
-Wno-error=format \
diff --git a/share/mk/configure/build-depends/git.mk b/share/mk/configure/build-depends/git/git.mk
index a861bed..29c3090 100644
--- a/share/mk/configure/build-depends/git.mk
+++ b/share/mk/configure/build-depends/git/git.mk
@@ -2,8 +2,8 @@
# SPDX-License-Identifier: LGPL-3.0-only WITH LGPL-3.0-linking-exception
-ifndef MAKEFILE_CONFIGURE_BUILD_DEPENDS_GIT_INCLUDED
-MAKEFILE_CONFIGURE_BUILD_DEPENDS_GIT_INCLUDED := 1
+ifndef MAKEFILE_CONFIGURE_BUILD_DEPENDS_GIT_GIT_INCLUDED
+MAKEFILE_CONFIGURE_BUILD_DEPENDS_GIT_GIT_INCLUDED := 1
GIT := git
diff --git a/share/mk/configure/build-depends/grep.mk b/share/mk/configure/build-depends/grep/grep.mk
index 7d89691..9b1afa5 100644
--- a/share/mk/configure/build-depends/grep.mk
+++ b/share/mk/configure/build-depends/grep/grep.mk
@@ -2,8 +2,8 @@
# SPDX-License-Identifier: LGPL-3.0-only WITH LGPL-3.0-linking-exception
-ifndef MAKEFILE_CONFIGURE_BUILD_DEPENDS_GREP_INCLUDED
-MAKEFILE_CONFIGURE_BUILD_DEPENDS_GREP_INCLUDED := 1
+ifndef MAKEFILE_CONFIGURE_BUILD_DEPENDS_GREP_GREP_INCLUDED
+MAKEFILE_CONFIGURE_BUILD_DEPENDS_GREP_GREP_INCLUDED := 1
GREP := grep
diff --git a/share/mk/configure/build-depends/groff-base.mk b/share/mk/configure/build-depends/groff-base.mk
deleted file mode 100644
index ab1f98d..0000000
--- a/share/mk/configure/build-depends/groff-base.mk
+++ /dev/null
@@ -1,72 +0,0 @@
-# Copyright 2024, Alejandro Colomar <alx@kernel.org>
-# SPDX-License-Identifier: LGPL-3.0-only WITH LGPL-3.0-linking-exception
-
-
-ifndef MAKEFILE_CONFIGURE_BUILD_DEPENDS_GROFF_BASE_INCLUDED
-MAKEFILE_CONFIGURE_BUILD_DEPENDS_GROFF_BASE_INCLUDED := 1
-
-
-include $(MAKEFILEDIR)/configure/build-depends/coreutils.mk
-include $(MAKEFILEDIR)/configure/build-depends/grep.mk
-include $(MAKEFILEDIR)/configure/build-depends/libc-bin.mk
-include $(MAKEFILEDIR)/configure/build-depends/man.mk
-
-
-DEFAULT_PRECONVFLAGS :=
-EXTRA_PRECONVFLAGS :=
-PRECONVFLAGS := $(DEFAULT_PRECONVFLAGS) $(EXTRA_PRECONVFLAGS)
-PRECONV := preconv
-
-
-DEFAULT_PICFLAGS :=
-EXTRA_PICFLAGS :=
-PICFLAGS := $(DEFAULT_PICFLAGS) $(EXTRA_PICFLAGS)
-PIC := pic
-
-
-TBL := tbl
-
-
-DEFAULT_EQNFLAGS :=
-EXTRA_EQNFLAGS :=
-EQNFLAGS := $(DEFAULT_EQNFLAGS) $(EXTRA_EQNFLAGS)
-EQN := eqn
-
-
-DEFAULT_TROFFFLAGS := -wbreak
-EXTRA_TROFFFLAGS :=
-TROFFFLAGS := $(DEFAULT_TROFFFLAGS) $(EXTRA_TROFFFLAGS)
-TROFF := troff
-
-
-TROFF_CHECKSTYLE_LVL := 3
-NROFF_LINE_LENGTH := $(shell $(EXPR) $(MANWIDTH) - 2)
-NROFF_OUT_DEVICE := \
- $(shell $(LOCALE) charmap \
- | $(GREP) -i 'utf-*8' >/dev/null \
- && $(ECHO) utf8 \
- || $(ECHO) ascii \
- )
-
-DEFAULT_NROFFFLAGS := \
- -T$(NROFF_OUT_DEVICE) \
- -rLL=$(NROFF_LINE_LENGTH)n \
- -rCHECKSTYLE=$(TROFF_CHECKSTYLE_LVL) \
- -ww
-EXTRA_NROFFFLAGS :=
-NROFFFLAGS := $(DEFAULT_NROFFFLAGS) $(EXTRA_NROFFFLAGS)
-
-
-DEFAULT_GROTTYFLAGS := -c
-EXTRA_GROTTYFLAGS :=
-GROTTYFLAGS := $(DEFAULT_GROTTYFLAGS) $(EXTRA_GROTTYFLAGS)
-GROTTY := grotty
-
-
-DEFAULT_GROPSFLAGS :=
-EXTRA_GROPSFLAGS :=
-GROPSFLAGS := $(DEFAULT_GROPSFLAGS) $(EXTRA_GROPSFLAGS)
-GROPS := grops
-
-
-endif # include guard
diff --git a/share/mk/configure/build-depends/groff-base/eqn.mk b/share/mk/configure/build-depends/groff-base/eqn.mk
new file mode 100644
index 0000000..57e4e51
--- /dev/null
+++ b/share/mk/configure/build-depends/groff-base/eqn.mk
@@ -0,0 +1,15 @@
+# Copyright 2024, Alejandro Colomar <alx@kernel.org>
+# SPDX-License-Identifier: LGPL-3.0-only WITH LGPL-3.0-linking-exception
+
+
+ifndef MAKEFILE_CONFIGURE_BUILD_DEPENDS_GROFF_BASE_EQN_INCLUDED
+MAKEFILE_CONFIGURE_BUILD_DEPENDS_GROFF_BASE_EQN_INCLUDED := 1
+
+
+DEFAULT_EQNFLAGS :=
+EXTRA_EQNFLAGS :=
+EQNFLAGS := $(DEFAULT_EQNFLAGS) $(EXTRA_EQNFLAGS)
+EQN := eqn
+
+
+endif # include guard
diff --git a/share/mk/configure/build-depends/groff-base/grops.mk b/share/mk/configure/build-depends/groff-base/grops.mk
new file mode 100644
index 0000000..b85daed
--- /dev/null
+++ b/share/mk/configure/build-depends/groff-base/grops.mk
@@ -0,0 +1,15 @@
+# Copyright 2024, Alejandro Colomar <alx@kernel.org>
+# SPDX-License-Identifier: LGPL-3.0-only WITH LGPL-3.0-linking-exception
+
+
+ifndef MAKEFILE_CONFIGURE_BUILD_DEPENDS_GROFF_BASE_GROPS_INCLUDED
+MAKEFILE_CONFIGURE_BUILD_DEPENDS_GROFF_BASE_GROPS_INCLUDED := 1
+
+
+DEFAULT_GROPSFLAGS :=
+EXTRA_GROPSFLAGS :=
+GROPSFLAGS := $(DEFAULT_GROPSFLAGS) $(EXTRA_GROPSFLAGS)
+GROPS := grops
+
+
+endif # include guard
diff --git a/share/mk/configure/build-depends/groff-base/grotty.mk b/share/mk/configure/build-depends/groff-base/grotty.mk
new file mode 100644
index 0000000..9fb0895
--- /dev/null
+++ b/share/mk/configure/build-depends/groff-base/grotty.mk
@@ -0,0 +1,15 @@
+# Copyright 2024, Alejandro Colomar <alx@kernel.org>
+# SPDX-License-Identifier: LGPL-3.0-only WITH LGPL-3.0-linking-exception
+
+
+ifndef MAKEFILE_CONFIGURE_BUILD_DEPENDS_GROFF_BASE_GROTTY_INCLUDED
+MAKEFILE_CONFIGURE_BUILD_DEPENDS_GROFF_BASE_GROTTY_INCLUDED := 1
+
+
+DEFAULT_GROTTYFLAGS := -c
+EXTRA_GROTTYFLAGS :=
+GROTTYFLAGS := $(DEFAULT_GROTTYFLAGS) $(EXTRA_GROTTYFLAGS)
+GROTTY := grotty
+
+
+endif # include guard
diff --git a/share/mk/configure/build-depends/groff-base/nroff.mk b/share/mk/configure/build-depends/groff-base/nroff.mk
new file mode 100644
index 0000000..b131e15
--- /dev/null
+++ b/share/mk/configure/build-depends/groff-base/nroff.mk
@@ -0,0 +1,35 @@
+# Copyright 2024, Alejandro Colomar <alx@kernel.org>
+# SPDX-License-Identifier: LGPL-3.0-only WITH LGPL-3.0-linking-exception
+
+
+ifndef MAKEFILE_CONFIGURE_BUILD_DEPENDS_GROFF_BASE_NROFF_INCLUDED
+MAKEFILE_CONFIGURE_BUILD_DEPENDS_GROFF_BASE_NROFF_INCLUDED := 1
+
+
+include $(MAKEFILEDIR)/configure/build-depends/coreutils/echo.mk
+include $(MAKEFILEDIR)/configure/build-depends/coreutils/expr.mk
+include $(MAKEFILEDIR)/configure/build-depends/grep/grep.mk
+include $(MAKEFILEDIR)/configure/build-depends/libc-bin/locale.mk
+include $(MAKEFILEDIR)/configure/build-depends/man/man.mk
+
+
+NROFF_CHECKSTYLE_LVL := 3
+NROFF_LINE_LENGTH := $(shell $(EXPR) $(MANWIDTH) - 2)
+NROFF_OUT_DEVICE := \
+ $(shell $(LOCALE) charmap \
+ | $(GREP) -i 'utf-*8' >/dev/null \
+ && $(ECHO) utf8 \
+ || $(ECHO) ascii \
+ )
+
+
+DEFAULT_NROFFFLAGS := \
+ -T$(NROFF_OUT_DEVICE) \
+ -rLL=$(NROFF_LINE_LENGTH)n \
+ -rCHECKSTYLE=$(NROFF_CHECKSTYLE_LVL) \
+ -ww
+EXTRA_NROFFFLAGS :=
+NROFFFLAGS := $(DEFAULT_NROFFFLAGS) $(EXTRA_NROFFFLAGS)
+
+
+endif # include guard
diff --git a/share/mk/configure/build-depends/groff-base/pic.mk b/share/mk/configure/build-depends/groff-base/pic.mk
new file mode 100644
index 0000000..72e8d34
--- /dev/null
+++ b/share/mk/configure/build-depends/groff-base/pic.mk
@@ -0,0 +1,15 @@
+# Copyright 2024, Alejandro Colomar <alx@kernel.org>
+# SPDX-License-Identifier: LGPL-3.0-only WITH LGPL-3.0-linking-exception
+
+
+ifndef MAKEFILE_CONFIGURE_BUILD_DEPENDS_GROFF_BASE_PIC_INCLUDED
+MAKEFILE_CONFIGURE_BUILD_DEPENDS_GROFF_BASE_PIC_INCLUDED := 1
+
+
+DEFAULT_PICFLAGS :=
+EXTRA_PICFLAGS :=
+PICFLAGS := $(DEFAULT_PICFLAGS) $(EXTRA_PICFLAGS)
+PIC := pic
+
+
+endif # include guard
diff --git a/share/mk/configure/build-depends/groff-base/preconv.mk b/share/mk/configure/build-depends/groff-base/preconv.mk
new file mode 100644
index 0000000..8cd7808
--- /dev/null
+++ b/share/mk/configure/build-depends/groff-base/preconv.mk
@@ -0,0 +1,15 @@
+# Copyright 2024, Alejandro Colomar <alx@kernel.org>
+# SPDX-License-Identifier: LGPL-3.0-only WITH LGPL-3.0-linking-exception
+
+
+ifndef MAKEFILE_CONFIGURE_BUILD_DEPENDS_GROFF_BASE_PRECONV_INCLUDED
+MAKEFILE_CONFIGURE_BUILD_DEPENDS_GROFF_BASE_PRECONV_INCLUDED := 1
+
+
+DEFAULT_PRECONVFLAGS :=
+EXTRA_PRECONVFLAGS :=
+PRECONVFLAGS := $(DEFAULT_PRECONVFLAGS) $(EXTRA_PRECONVFLAGS)
+PRECONV := preconv
+
+
+endif # include guard
diff --git a/share/mk/configure/build-depends/groff-base/tbl.mk b/share/mk/configure/build-depends/groff-base/tbl.mk
new file mode 100644
index 0000000..ff87a62
--- /dev/null
+++ b/share/mk/configure/build-depends/groff-base/tbl.mk
@@ -0,0 +1,12 @@
+# Copyright 2024, Alejandro Colomar <alx@kernel.org>
+# SPDX-License-Identifier: LGPL-3.0-only WITH LGPL-3.0-linking-exception
+
+
+ifndef MAKEFILE_CONFIGURE_BUILD_DEPENDS_GROFF_BASE_TBL_INCLUDED
+MAKEFILE_CONFIGURE_BUILD_DEPENDS_GROFF_BASE_TBL_INCLUDED := 1
+
+
+TBL := tbl
+
+
+endif # include guard
diff --git a/share/mk/configure/build-depends/groff-base/troff.mk b/share/mk/configure/build-depends/groff-base/troff.mk
new file mode 100644
index 0000000..b9b7518
--- /dev/null
+++ b/share/mk/configure/build-depends/groff-base/troff.mk
@@ -0,0 +1,17 @@
+# Copyright 2024, Alejandro Colomar <alx@kernel.org>
+# SPDX-License-Identifier: LGPL-3.0-only WITH LGPL-3.0-linking-exception
+
+
+ifndef MAKEFILE_CONFIGURE_BUILD_DEPENDS_GROFF_BASE_TROFF_INCLUDED
+MAKEFILE_CONFIGURE_BUILD_DEPENDS_GROFF_BASE_TROFF_INCLUDED := 1
+
+
+DEFAULT_TROFFFLAGS := \
+ -wbreak \
+ -rS12
+EXTRA_TROFFFLAGS :=
+TROFFFLAGS := $(DEFAULT_TROFFFLAGS) $(EXTRA_TROFFFLAGS)
+TROFF := troff
+
+
+endif # include guard
diff --git a/share/mk/configure/build-depends/groff/afmtodit.mk b/share/mk/configure/build-depends/groff/afmtodit.mk
new file mode 100644
index 0000000..7ffa7a0
--- /dev/null
+++ b/share/mk/configure/build-depends/groff/afmtodit.mk
@@ -0,0 +1,19 @@
+# Copyright 2024, Alejandro Colomar <alx@kernel.org>
+# SPDX-License-Identifier: LGPL-3.0-only WITH LGPL-3.0-linking-exception
+
+
+ifndef MAKEFILE_CONFIGURE_BUILD_DEPENDS_GROFF_AFMTODIT_INCLUDED
+MAKEFILE_CONFIGURE_BUILD_DEPENDS_GROFF_AFMTODIT_INCLUDED := 1
+
+
+PDF_TEXT_ENC := /usr/share/groff/current/font/devpdf/enc/text.enc
+PDF_TEXT_MAP := /usr/share/groff/current/font/devpdf/map/text.map
+
+
+DEFAULT_AFMTODITFLAGS :=
+EXTRA_AFMTODITFLAGS :=
+AFMTODITFLAGS := $(DEFAULT_AFMTODITFLAGS) $(EXTRA_AFMTODITFLAGS)
+AFMTODIT := afmtodit
+
+
+endif # include guard
diff --git a/share/mk/configure/build-depends/groff/gropdf.mk b/share/mk/configure/build-depends/groff/gropdf.mk
new file mode 100644
index 0000000..c8edad6
--- /dev/null
+++ b/share/mk/configure/build-depends/groff/gropdf.mk
@@ -0,0 +1,15 @@
+# Copyright 2024, Alejandro Colomar <alx@kernel.org>
+# SPDX-License-Identifier: LGPL-3.0-only WITH LGPL-3.0-linking-exception
+
+
+ifndef MAKEFILE_CONFIGURE_BUILD_DEPENDS_GROFF_GROPDF_INCLUDED
+MAKEFILE_CONFIGURE_BUILD_DEPENDS_GROFF_GROPDF_INCLUDED := 1
+
+
+DEFAULT_GROPDFFLAGS :=
+EXTRA_GROPDFFLAGS :=
+GROPDFFLAGS := $(DEFAULT_GROPDFFLAGS) $(EXTRA_GROPDFFLAGS)
+GROPDF := gropdf
+
+
+endif # include guard
diff --git a/share/mk/configure/build-depends/groff/pfbtops.mk b/share/mk/configure/build-depends/groff/pfbtops.mk
new file mode 100644
index 0000000..73f5f04
--- /dev/null
+++ b/share/mk/configure/build-depends/groff/pfbtops.mk
@@ -0,0 +1,15 @@
+# Copyright 2024, Alejandro Colomar <alx@kernel.org>
+# SPDX-License-Identifier: LGPL-3.0-only WITH LGPL-3.0-linking-exception
+
+
+ifndef MAKEFILE_CONFIGURE_BUILD_DEPENDS_GROFF_PFBTOPS_INCLUDED
+MAKEFILE_CONFIGURE_BUILD_DEPENDS_GROFF_PFBTOPS_INCLUDED := 1
+
+
+DEFAULT_PFBTOPSFLAGS :=
+EXTRA_PFBTOPSFLAGS :=
+PFBTOPSFLAGS := $(DEFAULT_PFBTOPSFLAGS) $(EXTRA_PFBTOPSFLAGS)
+PFBTOPS := pfbtops
+
+
+endif # include guard
diff --git a/share/mk/configure/build-depends/groff.mk b/share/mk/configure/build-depends/groff/post-grohtml.mk
index ea0c7a3..700c0e2 100644
--- a/share/mk/configure/build-depends/groff.mk
+++ b/share/mk/configure/build-depends/groff/post-grohtml.mk
@@ -2,14 +2,8 @@
# SPDX-License-Identifier: LGPL-3.0-only WITH LGPL-3.0-linking-exception
-ifndef MAKEFILE_CONFIGURE_BUILD_DEPENDS_GROFF_INCLUDED
-MAKEFILE_CONFIGURE_BUILD_DEPENDS_GROFF_INCLUDED := 1
-
-
-DEFAULT_GROPDFFLAGS :=
-EXTRA_GROPDFFLAGS :=
-GROPDFFLAGS := $(DEFAULT_GROPDFFLAGS) $(EXTRA_GROPDFFLAGS)
-GROPDF := gropdf
+ifndef MAKEFILE_CONFIGURE_BUILD_DEPENDS_GROFF_POST_GROHTML_INCLUDED
+MAKEFILE_CONFIGURE_BUILD_DEPENDS_GROFF_POST_GROHTML_INCLUDED := 1
DEFAULT_POST_GROHTMLFLAGS :=
diff --git a/share/mk/configure/build-depends/gzip.mk b/share/mk/configure/build-depends/gzip/gzip.mk
index 6633654..0e37483 100644
--- a/share/mk/configure/build-depends/gzip.mk
+++ b/share/mk/configure/build-depends/gzip/gzip.mk
@@ -2,8 +2,8 @@
# SPDX-License-Identifier: LGPL-3.0-only WITH LGPL-3.0-linking-exception
-ifndef MAKEFILE_CONFIGURE_BUILD_DEPENDS_GZIP_INCLUDED
-MAKEFILE_CONFIGURE_BUILD_DEPENDS_GZIP_INCLUDED := 1
+ifndef MAKEFILE_CONFIGURE_BUILD_DEPENDS_GZIP_GZIP_INCLUDED
+MAKEFILE_CONFIGURE_BUILD_DEPENDS_GZIP_GZIP_INCLUDED := 1
DEFAULT_GZIPFLAGS := -n
diff --git a/share/mk/configure/build-depends/iwyu.mk b/share/mk/configure/build-depends/iwyu/iwyu.mk
index bd5cf7f..4c0d707 100644
--- a/share/mk/configure/build-depends/iwyu.mk
+++ b/share/mk/configure/build-depends/iwyu/iwyu.mk
@@ -2,8 +2,8 @@
# SPDX-License-Identifier: LGPL-3.0-only WITH LGPL-3.0-linking-exception
-ifndef MAKEFILE_CONFIGURE_BUILD_DEPENDS_IWYU_INCLUDED
-MAKEFILE_CONFIGURE_BUILD_DEPENDS_IWYU_INCLUDED := 1
+ifndef MAKEFILE_CONFIGURE_BUILD_DEPENDS_IWYU_IWYU_INCLUDED
+MAKEFILE_CONFIGURE_BUILD_DEPENDS_IWYU_IWYU_INCLUDED := 1
DEFAULT_IWYUFLAGS := \
diff --git a/share/mk/configure/build-depends/libc-bin.mk b/share/mk/configure/build-depends/libc-bin/locale.mk
index 281502b..fe670f4 100644
--- a/share/mk/configure/build-depends/libc-bin.mk
+++ b/share/mk/configure/build-depends/libc-bin/locale.mk
@@ -2,8 +2,8 @@
# SPDX-License-Identifier: LGPL-3.0-only WITH LGPL-3.0-linking-exception
-ifndef MAKEFILE_CONFIGURE_BUILD_DEPENDS_LIBC_BIN_INCLUDED
-MAKEFILE_CONFIGURE_BUILD_DEPENDS_LIBC_BIN_INCLUDED := 1
+ifndef MAKEFILE_CONFIGURE_BUILD_DEPENDS_LIBC_BIN_LOCALE_INCLUDED
+MAKEFILE_CONFIGURE_BUILD_DEPENDS_LIBC_BIN_LOCALE_INCLUDED := 1
LOCALE := locale
diff --git a/share/mk/configure/build-depends/lzip.mk b/share/mk/configure/build-depends/lzip/lzip.mk
index e18868f..e2a0d82 100644
--- a/share/mk/configure/build-depends/lzip.mk
+++ b/share/mk/configure/build-depends/lzip/lzip.mk
@@ -2,8 +2,8 @@
# SPDX-License-Identifier: LGPL-3.0-only WITH LGPL-3.0-linking-exception
-ifndef MAKEFILE_CONFIGURE_BUILD_DEPENDS_LZIP_INCLUDED
-MAKEFILE_CONFIGURE_BUILD_DEPENDS_LZIP_INCLUDED := 1
+ifndef MAKEFILE_CONFIGURE_BUILD_DEPENDS_LZIP_LZIP_INCLUDED
+MAKEFILE_CONFIGURE_BUILD_DEPENDS_LZIP_LZIP_INCLUDED := 1
DEFAULT_LZIPFLAGS :=
diff --git a/share/mk/configure/build-depends/man.mk b/share/mk/configure/build-depends/man/man.mk
index 5248d42..22ce6c0 100644
--- a/share/mk/configure/build-depends/man.mk
+++ b/share/mk/configure/build-depends/man/man.mk
@@ -2,8 +2,8 @@
# SPDX-License-Identifier: LGPL-3.0-only WITH LGPL-3.0-linking-exception
-ifndef MAKEFILE_CONFIGURE_BUILD_DEPENDS_MAN_INCLUDED
-MAKEFILE_CONFIGURE_BUILD_DEPENDS_MAN_INCLUDED := 1
+ifndef MAKEFILE_CONFIGURE_BUILD_DEPENDS_MAN_MAN_INCLUDED
+MAKEFILE_CONFIGURE_BUILD_DEPENDS_MAN_MAN_INCLUDED := 1
MANWIDTH ?= 80
diff --git a/share/mk/configure/build-depends/mandoc.mk b/share/mk/configure/build-depends/mandoc/mandoc.mk
index 87eccd6..80c5b04 100644
--- a/share/mk/configure/build-depends/mandoc.mk
+++ b/share/mk/configure/build-depends/mandoc/mandoc.mk
@@ -2,8 +2,8 @@
# SPDX-License-Identifier: LGPL-3.0-only WITH LGPL-3.0-linking-exception
-ifndef MAKEFILE_CONFIGURE_BUILD_DEPENDS_MANDOC_INCLUDED
-MAKEFILE_CONFIGURE_BUILD_DEPENDS_MANDOC_INCLUDED := 1
+ifndef MAKEFILE_CONFIGURE_BUILD_DEPENDS_MANDOC_MANDOC_INCLUDED
+MAKEFILE_CONFIGURE_BUILD_DEPENDS_MANDOC_MANDOC_INCLUDED := 1
DEFAULT_MANDOCFLAGS := -Tlint
diff --git a/share/mk/configure/build-depends/moreutils.mk b/share/mk/configure/build-depends/moreutils/sponge.mk
index 69b60fa..e9b8989 100644
--- a/share/mk/configure/build-depends/moreutils.mk
+++ b/share/mk/configure/build-depends/moreutils/sponge.mk
@@ -2,8 +2,8 @@
# SPDX-License-Identifier: LGPL-3.0-only WITH LGPL-3.0-linking-exception
-ifndef MAKEFILE_CONFIGURE_BUILD_DEPENDS_MOREUTILS_INCLUDED
-MAKEFILE_CONFIGURE_BUILD_DEPENDS_MOREUTILS_INCLUDED := 1
+ifndef MAKEFILE_CONFIGURE_BUILD_DEPENDS_MOREUTILS_SPONGE_INCLUDED
+MAKEFILE_CONFIGURE_BUILD_DEPENDS_MOREUTILS_SPONGE_INCLUDED := 1
SPONGE := sponge
diff --git a/share/mk/configure/build-depends/pkgconf.mk b/share/mk/configure/build-depends/pkgconf/pkgconf.mk
index b7b5c3f..f6bc885 100644
--- a/share/mk/configure/build-depends/pkgconf.mk
+++ b/share/mk/configure/build-depends/pkgconf/pkgconf.mk
@@ -2,12 +2,8 @@
# SPDX-License-Identifier: LGPL-3.0-only WITH LGPL-3.0-linking-exception
-ifndef MAKEFILE_CONFIGURE_BUILD_DEPENDS_PKGCONF_INCLUDED
-MAKEFILE_CONFIGURE_BUILD_DEPENDS_PKGCONF_INCLUDED := 1
-
-
-include $(MAKEFILEDIR)/src.mk
-include $(MAKEFILEDIR)/configure/version.mk
+ifndef MAKEFILE_CONFIGURE_BUILD_DEPENDS_PKGCONF_PKGCONF_INCLUDED
+MAKEFILE_CONFIGURE_BUILD_DEPENDS_PKGCONF_PKGCONF_INCLUDED := 1
# Compat
diff --git a/share/mk/configure/build-depends/sed.mk b/share/mk/configure/build-depends/sed/sed.mk
index 3d1fcd8..30dcf20 100644
--- a/share/mk/configure/build-depends/sed.mk
+++ b/share/mk/configure/build-depends/sed/sed.mk
@@ -2,8 +2,8 @@
# SPDX-License-Identifier: LGPL-3.0-only WITH LGPL-3.0-linking-exception
-ifndef MAKEFILE_CONFIGURE_BUILD_DEPENDS_SED_INCLUDED
-MAKEFILE_CONFIGURE_BUILD_DEPENDS_SED_INCLUDED := 1
+ifndef MAKEFILE_CONFIGURE_BUILD_DEPENDS_SED_SED_INCLUDED
+MAKEFILE_CONFIGURE_BUILD_DEPENDS_SED_SED_INCLUDED := 1
SED := sed
diff --git a/share/mk/configure/build-depends/tar.mk b/share/mk/configure/build-depends/tar/tar.mk
index 3ea5537..d9b87db 100644
--- a/share/mk/configure/build-depends/tar.mk
+++ b/share/mk/configure/build-depends/tar/tar.mk
@@ -2,8 +2,8 @@
# SPDX-License-Identifier: LGPL-3.0-only WITH LGPL-3.0-linking-exception
-ifndef MAKEFILE_CONFIGURE_BUILD_DEPENDS_TAR_INCLUDED
-MAKEFILE_CONFIGURE_BUILD_DEPENDS_TAR_INCLUDED := 1
+ifndef MAKEFILE_CONFIGURE_BUILD_DEPENDS_TAR_TAR_INCLUDED
+MAKEFILE_CONFIGURE_BUILD_DEPENDS_TAR_TAR_INCLUDED := 1
include $(MAKEFILEDIR)/configure/version.mk
diff --git a/share/mk/configure/build-depends/texlive-fonts-extra-links/Tinos-Regular.ttf.mk b/share/mk/configure/build-depends/texlive-fonts-extra-links/Tinos-Regular.ttf.mk
new file mode 100644
index 0000000..1005f6b
--- /dev/null
+++ b/share/mk/configure/build-depends/texlive-fonts-extra-links/Tinos-Regular.ttf.mk
@@ -0,0 +1,12 @@
+# Copyright 2024, Alejandro Colomar <alx@kernel.org>
+# SPDX-License-Identifier: LGPL-3.0-only WITH LGPL-3.0-linking-exception
+
+
+ifndef MAKEFILE_CONFIGURE_BUILD_DEPENDS_TEXLIVE_FONTS_EXTRA_LINKS_TINOS_REGULAR_TTF_INCLUDED
+MAKEFILE_CONFIGURE_BUILD_DEPENDS_TEXLIVE_FONTS_EXTRA_LINKS_TINOS_REGULAR_TTF_INCLUDED := 1
+
+
+TINOSR_TTF := /usr/share/texlive/texmf-dist/fonts/truetype/google/tinos/Tinos-Regular.ttf
+
+
+endif # include guard
diff --git a/share/mk/configure/build-depends/texlive-fonts-extra/Tinos.pfb.mk b/share/mk/configure/build-depends/texlive-fonts-extra/Tinos.pfb.mk
new file mode 100644
index 0000000..c1c713c
--- /dev/null
+++ b/share/mk/configure/build-depends/texlive-fonts-extra/Tinos.pfb.mk
@@ -0,0 +1,12 @@
+# Copyright 2024, Alejandro Colomar <alx@kernel.org>
+# SPDX-License-Identifier: LGPL-3.0-only WITH LGPL-3.0-linking-exception
+
+
+ifndef MAKEFILE_CONFIGURE_BUILD_DEPENDS_TEXLIVE_FONTS_EXTRA_TINOS_PFB_INCLUDED
+MAKEFILE_CONFIGURE_BUILD_DEPENDS_TEXLIVE_FONTS_EXTRA_TINOS_PFB_INCLUDED := 1
+
+
+TINOS_PFB := /usr/share/texlive/texmf-dist/fonts/type1/google/tinos/Tinos.pfb
+
+
+endif # include guard
diff --git a/share/mk/configure/build-depends/xz-utils.mk b/share/mk/configure/build-depends/xz-utils/xz.mk
index d00a3b7..c3c772b 100644
--- a/share/mk/configure/build-depends/xz-utils.mk
+++ b/share/mk/configure/build-depends/xz-utils/xz.mk
@@ -2,8 +2,8 @@
# SPDX-License-Identifier: LGPL-3.0-only WITH LGPL-3.0-linking-exception
-ifndef MAKEFILE_CONFIGURE_BUILD_DEPENDS_XZ_UTILS_INCLUDED
-MAKEFILE_CONFIGURE_BUILD_DEPENDS_XZ_UTILS_INCLUDED := 1
+ifndef MAKEFILE_CONFIGURE_BUILD_DEPENDS_XZ_UTILS_XZ_INCLUDED
+MAKEFILE_CONFIGURE_BUILD_DEPENDS_XZ_UTILS_XZ_INCLUDED := 1
DEFAULT_XZFLAGS :=
diff --git a/share/mk/configure/directory_variables/build.mk b/share/mk/configure/directory_variables/build.mk
new file mode 100644
index 0000000..e31da03
--- /dev/null
+++ b/share/mk/configure/directory_variables/build.mk
@@ -0,0 +1,12 @@
+# Copyright 2021-2024, Alejandro Colomar <alx@kernel.org>
+# SPDX-License-Identifier: LGPL-3.0-only WITH LGPL-3.0-linking-exception
+
+
+ifndef MAKEFILE_CONFIGURE_DIRECTORY_VARIABLES_BUILD_INCLUDED
+MAKEFILE_CONFIGURE_DIRECTORY_VARIABLES_BUILD_INCLUDED := 1
+
+
+builddir := .tmp
+
+
+endif # include guard
diff --git a/share/mk/configure/directory_variables.mk b/share/mk/configure/directory_variables/install.mk
index e4ee616..cd5fda6 100644
--- a/share/mk/configure/directory_variables.mk
+++ b/share/mk/configure/directory_variables/install.mk
@@ -2,22 +2,20 @@
# SPDX-License-Identifier: LGPL-3.0-only WITH LGPL-3.0-linking-exception
-ifndef MAKEFILE_CONFIGURE_DIRECTORY_VARIABLES_INCLUDED
-MAKEFILE_CONFIGURE_DIRECTORY_VARIABLES_INCLUDED := 1
+ifndef MAKEFILE_CONFIGURE_DIRECTORY_VARIABLES_INSTALL_INCLUDED
+MAKEFILE_CONFIGURE_DIRECTORY_VARIABLES_INSTALL_INCLUDED := 1
-include $(MAKEFILEDIR)/src.mk
-
-
-builddir := .tmp
+include $(MAKEFILEDIR)/configure/directory_variables/src.mk
DESTDIR :=
prefix := /usr/local
datarootdir := $(prefix)/share
+mandir := $(datarootdir)/man
docdir := $(datarootdir)/doc
htmldir := $(docdir)/html/man
-mandir := $(datarootdir)/man
+pdfdir := $(docdir)/pdf
$(foreach s, $(MANSECTIONS), \
diff --git a/share/mk/configure/directory_variables/src.mk b/share/mk/configure/directory_variables/src.mk
new file mode 100644
index 0000000..d86cbf1
--- /dev/null
+++ b/share/mk/configure/directory_variables/src.mk
@@ -0,0 +1,20 @@
+# Copyright 2021-2024, Alejandro Colomar <alx@kernel.org>
+# SPDX-License-Identifier: LGPL-3.0-only WITH LGPL-3.0-linking-exception
+
+
+ifndef MAKEFILE_CONFIGURE_DIRECTORY_VARIABLES_SRC_INCLUDED
+MAKEFILE_CONFIGURE_DIRECTORY_VARIABLES_SRC_INCLUDED := 1
+
+
+SYSCONFDIR := $(srcdir)/etc
+MANDIR := $(srcdir)/man
+
+
+MANSECTIONS := $(patsubst $(MANDIR)/man%/, %, $(wildcard $(MANDIR)/man*/))
+
+
+$(foreach s, $(MANSECTIONS), \
+ $(eval MAN$(s)DIR := $(MANDIR)/man$(s)))
+
+
+endif # include guard
diff --git a/share/mk/configure/link_pages.mk b/share/mk/configure/man/link_pages.mk
index 52136ef..8e9c56c 100644
--- a/share/mk/configure/link_pages.mk
+++ b/share/mk/configure/man/link_pages.mk
@@ -2,8 +2,8 @@
# SPDX-License-Identifier: LGPL-3.0-only WITH LGPL-3.0-linking-exception
-ifndef MAKEFILE_CONFIGURE_LINK_PAGES_INCLUDED
-MAKEFILE_CONFIGURE_LINK_PAGES_INCLUDED := 1
+ifndef MAKEFILE_CONFIGURE_MAN_LINK_PAGES_INCLUDED
+MAKEFILE_CONFIGURE_MAN_LINK_PAGES_INCLUDED := 1
LINK_PAGES := .so
diff --git a/share/mk/configure/src.mk b/share/mk/configure/src.mk
deleted file mode 100644
index 2a24f4e..0000000
--- a/share/mk/configure/src.mk
+++ /dev/null
@@ -1,16 +0,0 @@
-# Copyright 2021-2024, Alejandro Colomar <alx@kernel.org>
-# SPDX-License-Identifier: LGPL-3.0-only WITH LGPL-3.0-linking-exception
-
-
-ifndef MAKEFILE_CONFIGURE_SRC_INCLUDED
-MAKEFILE_CONFIGURE_SRC_INCLUDED := 1
-
-
-SYSCONFDIR := $(srcdir)/etc
-MANDIR := $(srcdir)
-
-
-MANSECTIONS := $(patsubst $(MANDIR)/man%/, %, $(wildcard $(MANDIR)/man*/))
-
-
-endif # include guard
diff --git a/share/mk/configure/version.mk b/share/mk/configure/version.mk
index cc89bae..24720ca 100644
--- a/share/mk/configure/version.mk
+++ b/share/mk/configure/version.mk
@@ -6,15 +6,25 @@ ifndef MAKEFILE_CONFIGURE_VERSION_INCLUDED
MAKEFILE_CONFIGURE_VERSION_INCLUDED := 1
-include $(MAKEFILEDIR)/configure/build-depends/coreutils.mk
-include $(MAKEFILEDIR)/configure/build-depends/findutils.mk
-include $(MAKEFILEDIR)/configure/build-depends/git.mk
-include $(MAKEFILEDIR)/configure/build-depends/grep.mk
+include $(MAKEFILEDIR)/configure/build-depends/coreutils/echo.mk
+include $(MAKEFILEDIR)/configure/build-depends/coreutils/sort.mk
+include $(MAKEFILEDIR)/configure/build-depends/coreutils/stat.mk
+include $(MAKEFILEDIR)/configure/build-depends/coreutils/tail.mk
+include $(MAKEFILEDIR)/configure/build-depends/findutils/find.mk
+include $(MAKEFILEDIR)/configure/build-depends/findutils/xargs.mk
+include $(MAKEFILEDIR)/configure/build-depends/git/git.mk
+include $(MAKEFILEDIR)/configure/build-depends/grep/grep.mk
+include $(MAKEFILEDIR)/configure/build-depends/sed/sed.mk
include $(MAKEFILEDIR)/configure/verbose.mk
-DISTNAME := man-pages-6.7
-DISTVERSION := 6.7
+projname := man-pages
+VERSION := 6.8
+EXTRAVERSION :=
+
+
+DISTVERSION := $(VERSION)$(EXTRAVERSION)
+DISTNAME := $(projname)-$(DISTVERSION)
DISTFILESCMD := \
@@ -37,7 +47,10 @@ DISTDATECMD := \
fi;
-DISTDATE := Tue, 19 Mar 2024 19:07:13 +0100
+DISTDATE := Sun, 19 May 2024 13:55:47 +0200
+
+
+MANPAGEDATECMD = $(GIT) log --format=%cs -1 -- $< $(HIDE_ERR)
endif # include guard
diff --git a/share/mk/configure/z.mk b/share/mk/configure/z.mk
deleted file mode 100644
index 2eec437..0000000
--- a/share/mk/configure/z.mk
+++ /dev/null
@@ -1,21 +0,0 @@
-# Copyright 2023-2024, Alejandro Colomar <alx@kernel.org>
-# SPDX-License-Identifier: LGPL-3.0-only WITH LGPL-3.0-linking-exception
-
-
-ifndef MAKEFILE_CONFIGURE_Z_INCLUDED
-MAKEFILE_CONFIGURE_Z_INCLUDED := 1
-
-
-Z :=
-ifeq ($(Z),)
-else ifeq ($(Z),.bz2)
-else ifeq ($(Z),.gz)
-else ifeq ($(Z),.lz)
-else ifeq ($(Z),.xz)
-else
-$(warning "Z": "$(Z)")
-$(error Valid values for "Z": ["", ".bz2", ".gz", ".lz", ".xz"])
-endif
-
-
-endif # include guard
diff --git a/share/mk/dist/_.mk b/share/mk/dist/_.mk
index f6d8669..f79f465 100644
--- a/share/mk/dist/_.mk
+++ b/share/mk/dist/_.mk
@@ -6,8 +6,8 @@ ifndef MAKEFILE_DIST_INCLUDED
MAKEFILE_DIST_INCLUDED := 1
-include $(MAKEFILEDIR)/configure/build-depends/coreutils.mk
-include $(MAKEFILEDIR)/configure/directory_variables.mk
+include $(MAKEFILEDIR)/configure/build-depends/coreutils/install.mk
+include $(MAKEFILEDIR)/configure/directory_variables/build.mk
_DISTDIR := $(builddir)/dist
diff --git a/share/mk/dist/check/_.mk b/share/mk/dist/check/_.mk
index a24b8f8..d0a3b5d 100644
--- a/share/mk/dist/check/_.mk
+++ b/share/mk/dist/check/_.mk
@@ -6,8 +6,8 @@ ifndef MAKEFILE_DIST_CHECK_INCLUDED
MAKEFILE_DIST_CHECK_INCLUDED := 1
-include $(MAKEFILEDIR)/configure/build-depends/coreutils.mk
-include $(MAKEFILEDIR)/configure/directory_variables.mk
+include $(MAKEFILEDIR)/configure/build-depends/coreutils/realpath.mk
+include $(MAKEFILEDIR)/configure/directory_variables/build.mk
include $(MAKEFILEDIR)/configure/version.mk
@@ -33,8 +33,11 @@ distcheck-%: $(_DISTCHECKSRCDIR) $(MK) | $$(@D)/
.PHONY: distcheck
distcheck: distcheck-diffoscope
distcheck: $(_DISTCHECKSRCDIR) $(MK)
- $(info $(INFO_)MAKE lint build check install dist)
- $(MAKE) $(_MAKE_OPTS) lint build check install dist \
+ $(info $(INFO_)MAKE lint build install dist)
+ $(MAKE) $(_MAKE_OPTS) lint build install dist \
+ 'INFO_= distcheck: '
+ $(info $(INFO_)MAKE check)
+ $(MAKE) $(_MAKE_OPTS) check \
'INFO_= distcheck: '
diff --git a/share/mk/dist/check/diffoscope.mk b/share/mk/dist/check/diffoscope.mk
index 33bcf30..14058cb 100644
--- a/share/mk/dist/check/diffoscope.mk
+++ b/share/mk/dist/check/diffoscope.mk
@@ -6,9 +6,9 @@ ifndef MAKEFILE_DIST_CHECK_DIFFOSCOPE_INCLUDED
MAKEFILE_DIST_CHECK_DIFFOSCOPE_INCLUDED := 1
-include $(MAKEFILEDIR)/configure/build-depends/coreutils.mk
-include $(MAKEFILEDIR)/configure/build-depends/diffoscope.mk
-include $(MAKEFILEDIR)/configure/directory_variables.mk
+include $(MAKEFILEDIR)/configure/build-depends/coreutils/touch.mk
+include $(MAKEFILEDIR)/configure/build-depends/diffoscope/diffoscope.mk
+include $(MAKEFILEDIR)/configure/directory_variables/build.mk
include $(MAKEFILEDIR)/dist/check/dist.mk
include $(MAKEFILEDIR)/dist/tar.mk
diff --git a/share/mk/dist/check/dist.mk b/share/mk/dist/check/dist.mk
index ecd565b..1e28b06 100644
--- a/share/mk/dist/check/dist.mk
+++ b/share/mk/dist/check/dist.mk
@@ -6,7 +6,6 @@ ifndef MAKEFILE_DIST_CHECK_DIST_INCLUDED
MAKEFILE_DIST_CHECK_DIST_INCLUDED := 1
-include $(MAKEFILEDIR)/configure/build-depends/sed.mk
include $(MAKEFILEDIR)/configure/version.mk
include $(MAKEFILEDIR)/dist/check/_.mk
include $(MAKEFILEDIR)/dist/check/tar.mk
diff --git a/share/mk/dist/check/tar.mk b/share/mk/dist/check/tar.mk
index bd28ce5..33f4cb0 100644
--- a/share/mk/dist/check/tar.mk
+++ b/share/mk/dist/check/tar.mk
@@ -6,8 +6,10 @@ ifndef MAKEFILE_DIST_CHECK_TAR_INCLUDED
MAKEFILE_DIST_CHECK_TAR_INCLUDED := 1
-include $(MAKEFILEDIR)/configure/build-depends/coreutils.mk
-include $(MAKEFILEDIR)/configure/build-depends/tar.mk
+include $(MAKEFILEDIR)/configure/build-depends/coreutils/cp.mk
+include $(MAKEFILEDIR)/configure/build-depends/coreutils/rm.mk
+include $(MAKEFILEDIR)/configure/build-depends/coreutils/touch.mk
+include $(MAKEFILEDIR)/configure/build-depends/tar/tar.mk
include $(MAKEFILEDIR)/configure/version.mk
include $(MAKEFILEDIR)/dist/check/_.mk
include $(MAKEFILEDIR)/dist/tar.mk
diff --git a/share/mk/dist/files.mk b/share/mk/dist/files.mk
index bc3f7ff..d5de946 100644
--- a/share/mk/dist/files.mk
+++ b/share/mk/dist/files.mk
@@ -6,18 +6,21 @@ ifndef MAKEFILE_DIST_FILES_INCLUDED
MAKEFILE_DIST_FILES_INCLUDED := 1
-include $(MAKEFILEDIR)/configure/build-depends/coreutils.mk
-include $(MAKEFILEDIR)/configure/build-depends/git.mk
-include $(MAKEFILEDIR)/configure/build-depends/grep.mk
-include $(MAKEFILEDIR)/configure/build-depends/sed.mk
+include $(MAKEFILEDIR)/configure/build-depends/coreutils/cp.mk
+include $(MAKEFILEDIR)/configure/build-depends/coreutils/echo.mk
+include $(MAKEFILEDIR)/configure/build-depends/coreutils/install.mk
+include $(MAKEFILEDIR)/configure/build-depends/coreutils/test.mk
+include $(MAKEFILEDIR)/configure/build-depends/git/git.mk
+include $(MAKEFILEDIR)/configure/build-depends/grep/grep.mk
+include $(MAKEFILEDIR)/configure/build-depends/sed/sed.mk
include $(MAKEFILEDIR)/configure/verbose.mk
include $(MAKEFILEDIR)/configure/version.mk
include $(MAKEFILEDIR)/dist/_.mk
DISTFILES := $(shell $(DISTFILESCMD) | $(SED) 's,:,\\:,g')
-_DISTFILES := $(patsubst $(srcdir)/%,$(_DISTDIR)/%,$(DISTFILES))
-_DISTPAGES := $(filter $(_DISTDIR)/man%,$(_DISTFILES))
+_DISTFILES := $(patsubst $(srcdir)/%, $(_DISTDIR)/%, $(DISTFILES))
+_DISTPAGES := $(filter $(_DISTDIR)/man/%, $(_DISTFILES))
_DISTVERSION := $(_DISTDIR)/share/mk/configure/version.mk
_DISTOTHERS := $(filter-out $(_DISTPAGES) $(_DISTVERSION), $(_DISTFILES))
@@ -27,11 +30,9 @@ FORCE_DISTVERSION := \
if $(TEST) -f $(_DISTVERSION); then \
<$(_DISTVERSION) \
$(GREP) \
- -e '^DISTVERSION :=' \
- -e '^DISTNAME :=' \
+ -e '^VERSION :=' \
-e '^DISTDATE :=' \
- | $(SED) '/^DISTVERSION := $(DISTVERSION)$$/d' \
- | $(SED) '/^DISTNAME := $(DISTNAME)$$/d' \
+ | $(SED) '/^VERSION := $(VERSION)$$/d' \
| $(SED) '/^DISTDATE := $(DISTDATE)$$/d' \
| $(GREP) ^ $(HIDE_ERR) >&2 \
&& $(ECHO) FORCE; \
@@ -39,18 +40,14 @@ FORCE_DISTVERSION := \
)
-$(_DISTPAGES): $(_DISTDIR)/man%: $(srcdir)/man% $(MK) | $$(@D)/
+$(_DISTPAGES): $(_DISTDIR)/man/%: $(srcdir)/man/% $(MK) | $$(@D)/
$(info $(INFO_)SED $@)
- <$< \
- $(SED) "/^.TH/s/(date)/$$($(GIT) log --format=%cs -1 -- $< $(HIDE_ERR))/" \
- | $(SED) '/^.TH/s/(unreleased)/$(DISTVERSION)/' \
- | $(INSTALL_DATA) -T /dev/stdin $@
+ $(SED) "/^\.TH/s/(date)/$$($(MANPAGEDATECMD))/" <$< >$@
$(_DISTVERSION): $(MAKEFILEDIR)/configure/version.mk $(MK) $(FORCE_DISTVERSION) | $$(@D)/
$(info $(INFO_)SED $@)
<$< \
- $(SED) 's/^DISTVERSION *:=.*/DISTVERSION := $(DISTVERSION)/' \
- | $(SED) 's/^DISTNAME *:=.*/DISTNAME := $(DISTNAME)/' \
+ $(SED) 's/^VERSION *:=.*/VERSION := $(VERSION)/' \
| $(SED) 's/^DISTDATE *:=.*/DISTDATE := $(DISTDATE)/' \
| $(INSTALL_DATA) -T /dev/stdin $@
diff --git a/share/mk/dist/tar.mk b/share/mk/dist/tar.mk
index a87557f..532bd22 100644
--- a/share/mk/dist/tar.mk
+++ b/share/mk/dist/tar.mk
@@ -6,11 +6,10 @@ ifndef MAKEFILE_DIST_TAR_INCLUDED
MAKEFILE_DIST_TAR_INCLUDED := 1
-include $(MAKEFILEDIR)/configure/build-depends/coreutils.mk
-include $(MAKEFILEDIR)/configure/build-depends/findutils.mk
-include $(MAKEFILEDIR)/configure/build-depends/git.mk
-include $(MAKEFILEDIR)/configure/build-depends/sed.mk
-include $(MAKEFILEDIR)/configure/build-depends/tar.mk
+include $(MAKEFILEDIR)/configure/build-depends/coreutils/sort.mk
+include $(MAKEFILEDIR)/configure/build-depends/findutils/xargs.mk
+include $(MAKEFILEDIR)/configure/build-depends/sed/sed.mk
+include $(MAKEFILEDIR)/configure/build-depends/tar/tar.mk
include $(MAKEFILEDIR)/configure/version.mk
include $(MAKEFILEDIR)/dist/_.mk
include $(MAKEFILEDIR)/dist/files.mk
diff --git a/share/mk/dist/z.mk b/share/mk/dist/z.mk
index b4b34fc..d7ffb7f 100644
--- a/share/mk/dist/z.mk
+++ b/share/mk/dist/z.mk
@@ -6,11 +6,11 @@ ifndef MAKEFILE_DIST_Z_INCLUDED
MAKEFILE_DIST_Z_INCLUDED := 1
-include $(MAKEFILEDIR)/configure/build-depends/bzip2.mk
-include $(MAKEFILEDIR)/configure/build-depends/coreutils.mk
-include $(MAKEFILEDIR)/configure/build-depends/gzip.mk
-include $(MAKEFILEDIR)/configure/build-depends/lzip.mk
-include $(MAKEFILEDIR)/configure/build-depends/xz-utils.mk
+include $(MAKEFILEDIR)/configure/build-depends/bzip2/bzip2.mk
+include $(MAKEFILEDIR)/configure/build-depends/coreutils/touch.mk
+include $(MAKEFILEDIR)/configure/build-depends/gzip/gzip.mk
+include $(MAKEFILEDIR)/configure/build-depends/lzip/lzip.mk
+include $(MAKEFILEDIR)/configure/build-depends/xz-utils/xz.mk
include $(MAKEFILEDIR)/dist/tar.mk
diff --git a/share/mk/install/_.mk b/share/mk/install/_.mk
index bb39de3..e4a0f3e 100644
--- a/share/mk/install/_.mk
+++ b/share/mk/install/_.mk
@@ -6,7 +6,8 @@ ifndef MAKEFILE_INSTALL_INCLUDED
MAKEFILE_INSTALL_INCLUDED := 1
-include $(MAKEFILEDIR)/configure/build-depends/coreutils.mk
+include $(MAKEFILEDIR)/configure/build-depends/coreutils/install.mk
+include $(MAKEFILEDIR)/configure/build-depends/coreutils/rm.mk
%/:
diff --git a/share/mk/install/html.mk b/share/mk/install/html.mk
index 047df90..f29220c 100644
--- a/share/mk/install/html.mk
+++ b/share/mk/install/html.mk
@@ -8,16 +8,16 @@ MAKEFILE_INSTALL_HTML_INCLUDED := 1
include $(MAKEFILEDIR)/build/_.mk
include $(MAKEFILEDIR)/build/html/post-grohtml.mk
-include $(MAKEFILEDIR)/configure/build-depends/coreutils.mk
-include $(MAKEFILEDIR)/configure/directory_variables.mk
+include $(MAKEFILEDIR)/configure/build-depends/coreutils/install.mk
+include $(MAKEFILEDIR)/configure/directory_variables/install.mk
include $(MAKEFILEDIR)/install/_.mk
_htmldir := $(DESTDIR)$(htmldir)
-_htmlpages := $(patsubst $(_MANDIR)/%,$(_htmldir)/%,$(_HTMLMAN))
-_htmlpages_rm := $(addsuffix -rm,$(wildcard $(_htmlpages)))
+_htmlpages := $(patsubst $(_MANDIR)/%,$(_htmldir)/%,$(_HTMLMAN))
+_htmlpages_rm := $(addsuffix -rm,$(wildcard $(_htmlpages)))
$(_htmlpages): $(_htmldir)/%: $(_MANDIR)/% $(MK) | $$(@D)/
diff --git a/share/mk/install/man.mk b/share/mk/install/man.mk
index 65c1ea5..e22276b 100644
--- a/share/mk/install/man.mk
+++ b/share/mk/install/man.mk
@@ -6,19 +6,19 @@ ifndef MAKEFILE_INSTALL_MAN_INCLUDED
MAKEFILE_INSTALL_MAN_INCLUDED := 1
-include $(MAKEFILEDIR)/configure/build-depends/bzip2.mk
-include $(MAKEFILEDIR)/configure/build-depends/coreutils.mk
-include $(MAKEFILEDIR)/configure/build-depends/findutils.mk
-include $(MAKEFILEDIR)/configure/build-depends/grep.mk
-include $(MAKEFILEDIR)/configure/build-depends/gzip.mk
-include $(MAKEFILEDIR)/configure/build-depends/lzip.mk
-include $(MAKEFILEDIR)/configure/build-depends/moreutils.mk
-include $(MAKEFILEDIR)/configure/build-depends/sed.mk
-include $(MAKEFILEDIR)/configure/build-depends/xz-utils.mk
-include $(MAKEFILEDIR)/configure/directory_variables.mk
-include $(MAKEFILEDIR)/configure/z.mk
+include $(MAKEFILEDIR)/configure/build-depends/coreutils/cat.mk
+include $(MAKEFILEDIR)/configure/build-depends/coreutils/install.mk
+include $(MAKEFILEDIR)/configure/build-depends/coreutils/ln.mk
+include $(MAKEFILEDIR)/configure/build-depends/coreutils/test.mk
+include $(MAKEFILEDIR)/configure/build-depends/findutils/xargs.mk
+include $(MAKEFILEDIR)/configure/build-depends/grep/grep.mk
+include $(MAKEFILEDIR)/configure/build-depends/moreutils/sponge.mk
+include $(MAKEFILEDIR)/configure/build-depends/sed/sed.mk
+include $(MAKEFILEDIR)/configure/directory_variables/install.mk
+include $(MAKEFILEDIR)/configure/directory_variables/src.mk
+include $(MAKEFILEDIR)/configure/man/link_pages.mk
include $(MAKEFILEDIR)/install/_.mk
-include $(MAKEFILEDIR)/src.mk
+include $(MAKEFILEDIR)/src/man.mk
_mandir := $(DESTDIR)$(mandir)
@@ -27,11 +27,11 @@ $(foreach s, $(MANSECTIONS), \
$(foreach s, $(MANSECTIONS), \
$(eval _man$(s)pages := \
- $(patsubst $(MAN$(s)DIR)/%.$(s), $(_man$(s)dir)/%$(man$(s)ext)$(Z), \
+ $(patsubst $(MAN$(s)DIR)/%.$(s), $(_man$(s)dir)/%$(man$(s)ext), \
$(MAN$(s)PAGES))))
$(foreach s, $(MANSECTIONS), \
$(eval _man$(s)intropage := \
- $(patsubst $(MAN$(s)DIR)/%.$(s), $(_man$(s)dir)/%$(man$(s)ext)$(Z), \
+ $(patsubst $(MAN$(s)DIR)/%.$(s), $(_man$(s)dir)/%$(man$(s)ext), \
$(MAN$(s)INTROPAGE))))
_manintropages := $(foreach s, $(MANSECTIONS), $(_man$(s)intropage))
_manpages := $(_manintropages) $(foreach s, $(MANSECTIONS), $(_man$(s)pages))
@@ -45,44 +45,24 @@ $(foreach s, $(MANSECTIONS), \
$(foreach s, $(MANSECTIONS), \
$(eval $(_man$(s)pages) $(_man$(s)intropage): \
- $(_man$(s)dir)/%$(man$(s)ext)$(Z): \
- $(MAN$(s)DIR)/%.$(s) $(MK) | $$$$(@D)/))
+ $(_man$(s)dir)/%$(man$(s)ext): \
+ $(_MANDIR)/man$(s)/%.$(s) $(MK) | $$$$(@D)/))
$(_manpages):
$(info $(INFO_)INSTALL $@)
- <$< \
- $(SED) $(foreach s, $(MANSECTIONS), \
- -e '/^\.so /s, man$(s)/\(.*\)\.$(s)$$, $(notdir $(man$(s)dir))/\1$(man$(s)ext)$(Z),') \
- | $(INSTALL_DATA) -T /dev/stdin $@
+ $(INSTALL_DATA) -T $< $@
+ $(SED) -i $(foreach s, $(MANSECTIONS), \
+ -e '/^\.so /s, man$(s)/\(.*\)\.$(s)$$, $(notdir $(man$(s)dir))/\1$(man$(s)ext),') \
+ $@
ifeq ($(LINK_PAGES),symlink)
- if $(GREP) '^\.so ' <$@ >/dev/null; then \
+ $(CAT) <$@ \
+ | if $(GREP) '^\.so ' >/dev/null; then \
$(GREP) '^\.so ' <$@ \
| $(SED) 's,^\.so \(.*\),../\1,' \
| $(XARGS) -I tgt $(LN) -fsT tgt $@; \
fi
endif
-ifeq ($(Z),.bz2)
- if ! $(TEST) -L $@; then \
- $(BZIP2) $(BZIP2FLAGS) <$@ \
- | $(SPONGE) $@; \
- fi
-else ifeq ($(Z),.gz)
- if ! $(TEST) -L $@; then \
- $(GZIP) $(GZIPFLAGS) <$@ \
- | $(SPONGE) $@; \
- fi
-else ifeq ($(Z),.lz)
- if ! $(TEST) -L $@; then \
- $(LZIP) $(LZIPFLAGS) <$@ \
- | $(SPONGE) $@; \
- fi
-else ifeq ($(Z),.xz)
- if ! $(TEST) -L $@; then \
- $(XZ) $(XZFLAGS) <$@ \
- | $(SPONGE) $@; \
- fi
-endif
.PHONY: install-manintro
diff --git a/share/mk/install/pdf/_.mk b/share/mk/install/pdf/_.mk
new file mode 100644
index 0000000..2559257
--- /dev/null
+++ b/share/mk/install/pdf/_.mk
@@ -0,0 +1,16 @@
+# Copyright 2021-2024, Alejandro Colomar <alx@kernel.org>
+# SPDX-License-Identifier: LGPL-3.0-only WITH LGPL-3.0-linking-exception
+
+
+ifndef MAKEFILE_INSTALL_PDF_INCLUDED
+MAKEFILE_INSTALL_PDF_INCLUDED := 1
+
+
+.PHONY: install-pdf
+install-pdf: install-pdf-book;
+
+.PHONY: uninstall-pdf
+uninstall-pdf: uninstall-pdf-book;
+
+
+endif # include guard
diff --git a/share/mk/install/pdf/book.mk b/share/mk/install/pdf/book.mk
new file mode 100644
index 0000000..083bce2
--- /dev/null
+++ b/share/mk/install/pdf/book.mk
@@ -0,0 +1,33 @@
+# Copyright 2021-2024, Alejandro Colomar <alx@kernel.org>
+# SPDX-License-Identifier: LGPL-3.0-only WITH LGPL-3.0-linking-exception
+
+
+ifndef MAKEFILE_INSTALL_PDF_BOOK_INCLUDED
+MAKEFILE_INSTALL_PDF_BOOK_INCLUDED := 1
+
+
+include $(MAKEFILEDIR)/build/pdf/book/_.mk
+include $(MAKEFILEDIR)/configure/build-depends/coreutils/install.mk
+include $(MAKEFILEDIR)/configure/directory_variables/install.mk
+
+
+_pdfdir := $(DESTDIR)$(pdfdir)
+
+
+_pdf_book := $(patsubst $(_PDFDIR)/%,$(_pdfdir)/%,$(_PDF_BOOK))
+_pdf_book_rm := $(addsuffix -rm,$(wildcard $(_pdf_book)))
+
+
+$(_pdf_book): $(_pdfdir)/%: $(_PDFDIR)/% $(MK) | $$(@D)/
+ $(info $(INFO_)INSTALL $@)
+ $(INSTALL_DATA) -T $< $@
+
+
+.PHONY: install-pdf-book
+install-pdf-book: $(_pdf_book);
+
+.PHONY: uninstall-pdf-book
+uninstall-pdf-book: $(_pdf_book_rm);
+
+
+endif # include guard
diff --git a/share/mk/lint/c/checkpatch.mk b/share/mk/lint/c/checkpatch.mk
index 7777a10..96cc15b 100644
--- a/share/mk/lint/c/checkpatch.mk
+++ b/share/mk/lint/c/checkpatch.mk
@@ -8,21 +8,26 @@ MAKEFILE_LINT_C_CHECKPATCH_INCLUDED := 1
include $(MAKEFILEDIR)/build/_.mk
include $(MAKEFILEDIR)/build/examples/src.mk
-include $(MAKEFILEDIR)/configure/build-depends/checkpatch.mk
-include $(MAKEFILEDIR)/configure/build-depends/coreutils.mk
+include $(MAKEFILEDIR)/configure/build-depends/checkpatch/checkpatch.mk
+include $(MAKEFILEDIR)/configure/build-depends/coreutils/touch.mk
include $(MAKEFILEDIR)/configure/xfail.mk
-_XFAIL_LINT_c_checkpatch := $(_MANDIR)/man2/bpf.2.d/bpf.lint-c.checkpatch.touch
+_XFAIL_LINT_c_EX_checkpatch := $(_MANDIR)/man2/bpf.2.d/bpf.c.lint-c.checkpatch.touch
-_LINT_c_checkpatch := $(patsubst %.c, %.lint-c.checkpatch.touch, $(_UNITS_ex_c))
+_LINT_c_EX_checkpatch := $(patsubst %, %.lint-c.checkpatch.touch, $(_EX_TU_src))
ifeq ($(SKIP_XFAIL),yes)
-_LINT_c_checkpatch := $(filter-out $(_XFAIL_LINT_c_checkpatch), $(_LINT_c_checkpatch))
+_LINT_c_EX_checkpatch := $(filter-out $(_XFAIL_LINT_c_EX_checkpatch), $(_LINT_c_EX_checkpatch))
endif
+_LINT_c_checkpatch := $(_LINT_c_EX_checkpatch)
-$(_LINT_c_checkpatch): %.lint-c.checkpatch.touch: %.c $(CHECKPATCH_CONF) $(MK)
+$(_LINT_c_EX_checkpatch): %.lint-c.checkpatch.touch: %
+$(_LINT_c_checkpatch): $(CHECKPATCH_CONF) $(MK) | $$(@D)/
+
+
+$(_LINT_c_checkpatch):
$(info $(INFO_)CHECKPATCH $@)
$(CHECKPATCH) $(CHECKPATCHFLAGS) -f $< >&2
$(TOUCH) $@
diff --git a/share/mk/lint/c/clang-tidy.mk b/share/mk/lint/c/clang-tidy.mk
index fd2e536..2f7c6dd 100644
--- a/share/mk/lint/c/clang-tidy.mk
+++ b/share/mk/lint/c/clang-tidy.mk
@@ -8,173 +8,178 @@ MAKEFILE_LINT_C_CLANG_TIDY_INCLUDED := 1
include $(MAKEFILEDIR)/build/_.mk
include $(MAKEFILEDIR)/build/examples/src.mk
-include $(MAKEFILEDIR)/configure/build-depends/clang.mk
-include $(MAKEFILEDIR)/configure/build-depends/clang-tidy.mk
-include $(MAKEFILEDIR)/configure/build-depends/coreutils.mk
-include $(MAKEFILEDIR)/configure/build-depends/cpp.mk
-include $(MAKEFILEDIR)/configure/build-depends/sed.mk
+include $(MAKEFILEDIR)/configure/build-depends/clang/clang.mk
+include $(MAKEFILEDIR)/configure/build-depends/clang-tidy/clang-tidy.mk
+include $(MAKEFILEDIR)/configure/build-depends/coreutils/touch.mk
+include $(MAKEFILEDIR)/configure/build-depends/cpp/cpp.mk
+include $(MAKEFILEDIR)/configure/build-depends/sed/sed.mk
include $(MAKEFILEDIR)/configure/xfail.mk
-_XFAIL_LINT_c_clang_tidy := \
- $(_MANDIR)/man2/add_key.2.d/add_key.lint-c.clang-tidy.touch \
- $(_MANDIR)/man2/bpf.2.d/bpf.lint-c.clang-tidy.touch \
- $(_MANDIR)/man2/chown.2.d/chown.lint-c.clang-tidy.touch \
- $(_MANDIR)/man2/clone.2.d/clone.lint-c.clang-tidy.touch \
- $(_MANDIR)/man2/close_range.2.d/close_range.lint-c.clang-tidy.touch \
- $(_MANDIR)/man2/copy_file_range.2.d/copy_file_range.lint-c.clang-tidy.touch \
- $(_MANDIR)/man2/eventfd.2.d/eventfd.lint-c.clang-tidy.touch \
- $(_MANDIR)/man2/execve.2.d/execve.lint-c.clang-tidy.touch \
- $(_MANDIR)/man2/execve.2.d/myecho.lint-c.clang-tidy.touch \
- $(_MANDIR)/man2/futex.2.d/futex.lint-c.clang-tidy.touch \
- $(_MANDIR)/man2/getdents.2.d/getdents.lint-c.clang-tidy.touch \
- $(_MANDIR)/man2/getrlimit.2.d/getrlimit.lint-c.clang-tidy.touch \
- $(_MANDIR)/man2/ioctl_fat.2.d/display_fat_volume_id.lint-c.clang-tidy.touch \
- $(_MANDIR)/man2/ioctl_fat.2.d/ioctl_fat.lint-c.clang-tidy.touch \
- $(_MANDIR)/man2/ioctl_fat.2.d/toggle_fat_archive_flag.lint-c.clang-tidy.touch \
- $(_MANDIR)/man2/ioctl_ns.2.d/ns_show.lint-c.clang-tidy.touch \
- $(_MANDIR)/man2/ioctl_tty.2.d/tcgets.lint-c.clang-tidy.touch \
- $(_MANDIR)/man2/kcmp.2.d/kcmp.lint-c.clang-tidy.touch \
- $(_MANDIR)/man2/keyctl.2.d/key_instantiate.lint-c.clang-tidy.touch \
- $(_MANDIR)/man2/listxattr.2.d/listxattr.lint-c.clang-tidy.touch \
- $(_MANDIR)/man2/membarrier.2.d/membarrier.lint-c.clang-tidy.touch \
- $(_MANDIR)/man2/memfd_create.2.d/t_get_seals.lint-c.clang-tidy.touch \
- $(_MANDIR)/man2/memfd_create.2.d/t_memfd_create.lint-c.clang-tidy.touch \
- $(_MANDIR)/man2/mmap.2.d/mmap.lint-c.clang-tidy.touch \
- $(_MANDIR)/man2/mount_setattr.2.d/mount_setattr.lint-c.clang-tidy.touch \
- $(_MANDIR)/man2/mprotect.2.d/mprotect.lint-c.clang-tidy.touch \
- $(_MANDIR)/man2/msgop.2.d/msgop.lint-c.clang-tidy.touch \
- $(_MANDIR)/man2/open_by_handle_at.2.d/t_name_to_handle_at.lint-c.clang-tidy.touch \
- $(_MANDIR)/man2/open_by_handle_at.2.d/t_open_by_handle_at.lint-c.clang-tidy.touch \
- $(_MANDIR)/man2/perf_event_open.2.d/perf_event_open.lint-c.clang-tidy.touch \
- $(_MANDIR)/man2/pidfd_open.2.d/pidfd_open.lint-c.clang-tidy.touch \
- $(_MANDIR)/man2/pidfd_send_signal.2.d/pidfd_send_signal.lint-c.clang-tidy.touch \
- $(_MANDIR)/man2/pipe.2.d/pipe.lint-c.clang-tidy.touch \
- $(_MANDIR)/man2/pivot_root.2.d/pivot_root.lint-c.clang-tidy.touch \
- $(_MANDIR)/man2/poll.2.d/poll_input.lint-c.clang-tidy.touch \
- $(_MANDIR)/man2/process_vm_readv.2.d/process_vm_readv.lint-c.clang-tidy.touch \
- $(_MANDIR)/man2/readlink.2.d/readlink.lint-c.clang-tidy.touch \
- $(_MANDIR)/man2/recvmmsg.2.d/recvmmsg.lint-c.clang-tidy.touch \
- $(_MANDIR)/man2/request_key.2.d/t_request_key.lint-c.clang-tidy.touch \
- $(_MANDIR)/man2/sched_setaffinity.2.d/sched_setaffinity.lint-c.clang-tidy.touch \
- $(_MANDIR)/man2/seccomp.2.d/seccomp.lint-c.clang-tidy.touch \
- $(_MANDIR)/man2/seccomp_unotify.2.d/seccomp_unotify.lint-c.clang-tidy.touch \
- $(_MANDIR)/man2/select_tut.2.d/select.lint-c.clang-tidy.touch \
- $(_MANDIR)/man2/semget.2.d/t_semget.lint-c.clang-tidy.touch \
- $(_MANDIR)/man2/sendmmsg.2.d/sendmmsg.lint-c.clang-tidy.touch \
- $(_MANDIR)/man2/setns.2.d/setns.lint-c.clang-tidy.touch \
- $(_MANDIR)/man2/shmop.2.d/svshm_string_read.lint-c.clang-tidy.touch \
- $(_MANDIR)/man2/shmop.2.d/svshm_string_write.lint-c.clang-tidy.touch \
- $(_MANDIR)/man2/sigaction.2.d/sigaction.lint-c.clang-tidy.touch \
- $(_MANDIR)/man2/spu_run.2.d/spu_run.lint-c.clang-tidy.touch \
- $(_MANDIR)/man2/stat.2.d/stat.lint-c.clang-tidy.touch \
- $(_MANDIR)/man2/_syscall.2.d/_syscall.lint-c.clang-tidy.touch \
- $(_MANDIR)/man2/syscall.2.d/syscall.lint-c.clang-tidy.touch \
- $(_MANDIR)/man2/sysctl.2.d/sysctl.lint-c.clang-tidy.touch \
- $(_MANDIR)/man2/tee.2.d/tee.lint-c.clang-tidy.touch \
- $(_MANDIR)/man2/timer_create.2.d/timer_create.lint-c.clang-tidy.touch \
- $(_MANDIR)/man2/timerfd_create.2.d/timerfd_create.lint-c.clang-tidy.touch \
- $(_MANDIR)/man2/unshare.2.d/unshare.lint-c.clang-tidy.touch \
- $(_MANDIR)/man2/userfaultfd.2.d/userfaultfd.lint-c.clang-tidy.touch \
- $(_MANDIR)/man2/wait.2.d/wait.lint-c.clang-tidy.touch \
- $(_MANDIR)/man3/atexit.3.d/atexit.lint-c.clang-tidy.touch \
- $(_MANDIR)/man3/backtrace.3.d/backtrace.lint-c.clang-tidy.touch \
- $(_MANDIR)/man3/bsearch.3.d/bsearch.lint-c.clang-tidy.touch \
- $(_MANDIR)/man3/bswap.3.d/bswap.lint-c.clang-tidy.touch \
- $(_MANDIR)/man3/cacos.3.d/cacos.lint-c.clang-tidy.touch \
- $(_MANDIR)/man3/cacosh.3.d/cacosh.lint-c.clang-tidy.touch \
- $(_MANDIR)/man3/catan.3.d/catan.lint-c.clang-tidy.touch \
- $(_MANDIR)/man3/catanh.3.d/catanh.lint-c.clang-tidy.touch \
- $(_MANDIR)/man3/circleq.3.d/circleq.lint-c.clang-tidy.touch \
- $(_MANDIR)/man3/clock_getcpuclockid.3.d/clock_getcpuclockid.lint-c.clang-tidy.touch \
- $(_MANDIR)/man3/CPU_SET.3.d/CPU_SET.lint-c.clang-tidy.touch \
- $(_MANDIR)/man3/dl_iterate_phdr.3.d/dl_iterate_phdr.lint-c.clang-tidy.touch \
- $(_MANDIR)/man3/dlinfo.3.d/dlinfo.lint-c.clang-tidy.touch \
- $(_MANDIR)/man3/duplocale.3.d/duplocale.lint-c.clang-tidy.touch \
- $(_MANDIR)/man3/encrypt.3.d/encrypt.lint-c.clang-tidy.touch \
- $(_MANDIR)/man3/end.3.d/end.lint-c.clang-tidy.touch \
- $(_MANDIR)/man3/endian.3.d/endian.lint-c.clang-tidy.touch \
- $(_MANDIR)/man3/envz_add.3.d/envz_add.lint-c.clang-tidy.touch \
- $(_MANDIR)/man3/fmemopen.3.d/fmemopen.lint-c.clang-tidy.touch \
- $(_MANDIR)/man3/fopencookie.3.d/fopencookie.lint-c.clang-tidy.touch \
- $(_MANDIR)/man3/fread.3.d/fread.lint-c.clang-tidy.touch \
- $(_MANDIR)/man3/frexp.3.d/frexp.lint-c.clang-tidy.touch \
- $(_MANDIR)/man3/ftw.3.d/ftw.lint-c.clang-tidy.touch \
- $(_MANDIR)/man3/_Generic.3.d/_Generic.lint-c.clang-tidy.touch \
- $(_MANDIR)/man3/getaddrinfo.3.d/client.lint-c.clang-tidy.touch \
- $(_MANDIR)/man3/getaddrinfo.3.d/server.lint-c.clang-tidy.touch \
- $(_MANDIR)/man3/getaddrinfo_a.3.d/async.lint-c.clang-tidy.touch \
- $(_MANDIR)/man3/getaddrinfo_a.3.d/sync.lint-c.clang-tidy.touch \
- $(_MANDIR)/man3/getdate.3.d/getdate.lint-c.clang-tidy.touch \
- $(_MANDIR)/man3/getgrent_r.3.d/getgrent_r.lint-c.clang-tidy.touch \
- $(_MANDIR)/man3/getgrouplist.3.d/getgrouplist.lint-c.clang-tidy.touch \
- $(_MANDIR)/man3/getline.3.d/getline.lint-c.clang-tidy.touch \
- $(_MANDIR)/man3/getopt.3.d/getopt.lint-c.clang-tidy.touch \
- $(_MANDIR)/man3/getopt.3.d/getopt_long.lint-c.clang-tidy.touch \
- $(_MANDIR)/man3/getprotoent_r.3.d/getprotoent_r.lint-c.clang-tidy.touch \
- $(_MANDIR)/man3/getpwnam.3.d/getpwnam.lint-c.clang-tidy.touch \
- $(_MANDIR)/man3/getservent_r.3.d/getservent_r.lint-c.clang-tidy.touch \
- $(_MANDIR)/man3/getsubopt.3.d/getsubopt.lint-c.clang-tidy.touch \
- $(_MANDIR)/man3/getutent.3.d/getutent.lint-c.clang-tidy.touch \
- $(_MANDIR)/man3/hsearch.3.d/hsearch.lint-c.clang-tidy.touch \
- $(_MANDIR)/man3/if_nameindex.3.d/if_nameindex.lint-c.clang-tidy.touch \
- $(_MANDIR)/man3/inet.3.d/inet.lint-c.clang-tidy.touch \
- $(_MANDIR)/man3/inet_net_pton.3.d/inet_net_pton.lint-c.clang-tidy.touch \
- $(_MANDIR)/man3/inet_pton.3.d/inet_pton.lint-c.clang-tidy.touch \
- $(_MANDIR)/man3/insque.3.d/insque.lint-c.clang-tidy.touch \
- $(_MANDIR)/man3/list.3.d/list.lint-c.clang-tidy.touch \
- $(_MANDIR)/man3/mallinfo.3.d/mallinfo.lint-c.clang-tidy.touch \
- $(_MANDIR)/man3/malloc_info.3.d/malloc_info.lint-c.clang-tidy.touch \
- $(_MANDIR)/man3/mallopt.3.d/mallopt.lint-c.clang-tidy.touch \
- $(_MANDIR)/man3/matherr.3.d/matherr.lint-c.clang-tidy.touch \
- $(_MANDIR)/man3/MAX.3.d/MAX.lint-c.clang-tidy.touch \
- $(_MANDIR)/man3/mbstowcs.3.d/mbstowcs.lint-c.clang-tidy.touch \
- $(_MANDIR)/man3/mq_getattr.3.d/mq_getattr.lint-c.clang-tidy.touch \
- $(_MANDIR)/man3/mq_notify.3.d/mq_notify.lint-c.clang-tidy.touch \
- $(_MANDIR)/man3/newlocale.3.d/newlocale.lint-c.clang-tidy.touch \
- $(_MANDIR)/man3/offsetof.3.d/offsetof.lint-c.clang-tidy.touch \
- $(_MANDIR)/man3/posix_spawn.3.d/posix_spawn.lint-c.clang-tidy.touch \
- $(_MANDIR)/man3/__ppc_get_timebase.3.d/__ppc_get_timebase.lint-c.clang-tidy.touch \
- $(_MANDIR)/man3/pthread_attr_init.3.d/pthread_attr_init.lint-c.clang-tidy.touch \
- $(_MANDIR)/man3/pthread_cleanup_push.3.d/pthread_cleanup_push.lint-c.clang-tidy.touch \
- $(_MANDIR)/man3/pthread_create.3.d/pthread_create.lint-c.clang-tidy.touch \
- $(_MANDIR)/man3/pthread_getattr_np.3.d/pthread_getattr_np.lint-c.clang-tidy.touch \
- $(_MANDIR)/man3/pthread_setname_np.3.d/pthread_setname_np.lint-c.clang-tidy.touch \
- $(_MANDIR)/man3/pthread_setschedparam.3.d/pthreads_sched_test.lint-c.clang-tidy.touch \
- $(_MANDIR)/man3/qsort.3.d/qsort.lint-c.clang-tidy.touch \
- $(_MANDIR)/man3/rand.3.d/rand.lint-c.clang-tidy.touch \
- $(_MANDIR)/man3/rpmatch.3.d/rpmatch.lint-c.clang-tidy.touch \
- $(_MANDIR)/man3/rtime.3.d/rtime.lint-c.clang-tidy.touch \
- $(_MANDIR)/man3/scandir.3.d/scandir.lint-c.clang-tidy.touch \
- $(_MANDIR)/man3/sem_wait.3.d/sem_wait.lint-c.clang-tidy.touch \
- $(_MANDIR)/man3/setbuf.3.d/setbuf.lint-c.clang-tidy.touch \
- $(_MANDIR)/man3/shm_open.3.d/pshm_ucase_bounce.lint-c.clang-tidy.touch \
- $(_MANDIR)/man3/shm_open.3.d/pshm_ucase_send.lint-c.clang-tidy.touch \
- $(_MANDIR)/man3/slist.3.d/slist.lint-c.clang-tidy.touch \
- $(_MANDIR)/man3/stailq.3.d/stailq.lint-c.clang-tidy.touch \
- $(_MANDIR)/man3/static_assert.3.d/must_be.lint-c.clang-tidy.touch \
- $(_MANDIR)/man3/stpncpy.3.d/stpncpy.lint-c.clang-tidy.touch \
- $(_MANDIR)/man3/strcmp.3.d/string_comp.lint-c.clang-tidy.touch \
- $(_MANDIR)/man3/strcpy.3.d/strcpy.lint-c.clang-tidy.touch \
- $(_MANDIR)/man3/strftime.3.d/strftime.lint-c.clang-tidy.touch \
- $(_MANDIR)/man3/strsep.3.d/strsep.lint-c.clang-tidy.touch \
- $(_MANDIR)/man3/strtok.3.d/strtok.lint-c.clang-tidy.touch \
- $(_MANDIR)/man3/strtol.3.d/strtol.lint-c.clang-tidy.touch \
- $(_MANDIR)/man3/strverscmp.3.d/strverscmp.lint-c.clang-tidy.touch \
- $(_MANDIR)/man3/tailq.3.d/tailq.lint-c.clang-tidy.touch \
- $(_MANDIR)/man3/tsearch.3.d/tsearch.lint-c.clang-tidy.touch \
- $(_MANDIR)/man3/wordexp.3.d/wordexp.lint-c.clang-tidy.touch \
- $(_MANDIR)/man3const/EXIT_SUCCESS.3const.d/EXIT_SUCCESS.lint-c.clang-tidy.touch \
- $(_MANDIR)/man3head/printf.h.3head.d/register_printf_specifier.lint-c.clang-tidy.touch
-
-
-_LINT_c_clang_tidy := $(patsubst %.c, %.lint-c.clang-tidy.touch, $(_UNITS_ex_c))
+_XFAIL_LINT_c_EX_clang_tidy := \
+ $(_MANDIR)/man2/add_key.2.d/add_key.c.lint-c.clang-tidy.touch \
+ $(_MANDIR)/man2/bpf.2.d/bpf.c.lint-c.clang-tidy.touch \
+ $(_MANDIR)/man2/chown.2.d/chown.c.lint-c.clang-tidy.touch \
+ $(_MANDIR)/man2/clone.2.d/clone.c.lint-c.clang-tidy.touch \
+ $(_MANDIR)/man2/close_range.2.d/close_range.c.lint-c.clang-tidy.touch \
+ $(_MANDIR)/man2/copy_file_range.2.d/copy_file_range.c.lint-c.clang-tidy.touch \
+ $(_MANDIR)/man2/eventfd.2.d/eventfd.c.lint-c.clang-tidy.touch \
+ $(_MANDIR)/man2/execve.2.d/execve.c.lint-c.clang-tidy.touch \
+ $(_MANDIR)/man2/execve.2.d/myecho.c.lint-c.clang-tidy.touch \
+ $(_MANDIR)/man2/futex.2.d/futex.c.lint-c.clang-tidy.touch \
+ $(_MANDIR)/man2/getdents.2.d/getdents.c.lint-c.clang-tidy.touch \
+ $(_MANDIR)/man2/getrlimit.2.d/getrlimit.c.lint-c.clang-tidy.touch \
+ $(_MANDIR)/man2/ioctl_fat.2.d/display_fat_volume_id.c.lint-c.clang-tidy.touch \
+ $(_MANDIR)/man2/ioctl_fat.2.d/ioctl_fat.c.lint-c.clang-tidy.touch \
+ $(_MANDIR)/man2/ioctl_fat.2.d/toggle_fat_archive_flag.c.lint-c.clang-tidy.touch \
+ $(_MANDIR)/man2/ioctl_ns.2.d/ns_show.c.lint-c.clang-tidy.touch \
+ $(_MANDIR)/man2/ioctl_tty.2.d/tcgets.c.lint-c.clang-tidy.touch \
+ $(_MANDIR)/man2/kcmp.2.d/kcmp.c.lint-c.clang-tidy.touch \
+ $(_MANDIR)/man2/keyctl.2.d/key_instantiate.c.lint-c.clang-tidy.touch \
+ $(_MANDIR)/man2/listxattr.2.d/listxattr.c.lint-c.clang-tidy.touch \
+ $(_MANDIR)/man2/membarrier.2.d/membarrier.c.lint-c.clang-tidy.touch \
+ $(_MANDIR)/man2/memfd_create.2.d/t_get_seals.c.lint-c.clang-tidy.touch \
+ $(_MANDIR)/man2/memfd_create.2.d/t_memfd_create.c.lint-c.clang-tidy.touch \
+ $(_MANDIR)/man2/mmap.2.d/mmap.c.lint-c.clang-tidy.touch \
+ $(_MANDIR)/man2/mount_setattr.2.d/mount_setattr.c.lint-c.clang-tidy.touch \
+ $(_MANDIR)/man2/mprotect.2.d/mprotect.c.lint-c.clang-tidy.touch \
+ $(_MANDIR)/man2/msgop.2.d/msgop.c.lint-c.clang-tidy.touch \
+ $(_MANDIR)/man2/open_by_handle_at.2.d/t_name_to_handle_at.c.lint-c.clang-tidy.touch \
+ $(_MANDIR)/man2/open_by_handle_at.2.d/t_open_by_handle_at.c.lint-c.clang-tidy.touch \
+ $(_MANDIR)/man2/perf_event_open.2.d/perf_event_open.c.lint-c.clang-tidy.touch \
+ $(_MANDIR)/man2/pidfd_open.2.d/pidfd_open.c.lint-c.clang-tidy.touch \
+ $(_MANDIR)/man2/pidfd_send_signal.2.d/pidfd_send_signal.c.lint-c.clang-tidy.touch \
+ $(_MANDIR)/man2/pipe.2.d/pipe.c.lint-c.clang-tidy.touch \
+ $(_MANDIR)/man2/pivot_root.2.d/pivot_root.c.lint-c.clang-tidy.touch \
+ $(_MANDIR)/man2/poll.2.d/poll_input.c.lint-c.clang-tidy.touch \
+ $(_MANDIR)/man2/process_vm_readv.2.d/process_vm_readv.c.lint-c.clang-tidy.touch \
+ $(_MANDIR)/man2/readlink.2.d/readlink.c.lint-c.clang-tidy.touch \
+ $(_MANDIR)/man2/recvmmsg.2.d/recvmmsg.c.lint-c.clang-tidy.touch \
+ $(_MANDIR)/man2/request_key.2.d/t_request_key.c.lint-c.clang-tidy.touch \
+ $(_MANDIR)/man2/sched_setaffinity.2.d/sched_setaffinity.c.lint-c.clang-tidy.touch \
+ $(_MANDIR)/man2/seccomp.2.d/seccomp.c.lint-c.clang-tidy.touch \
+ $(_MANDIR)/man2/seccomp_unotify.2.d/seccomp_unotify.c.lint-c.clang-tidy.touch \
+ $(_MANDIR)/man2/select_tut.2.d/select.c.lint-c.clang-tidy.touch \
+ $(_MANDIR)/man2/semget.2.d/t_semget.c.lint-c.clang-tidy.touch \
+ $(_MANDIR)/man2/sendmmsg.2.d/sendmmsg.c.lint-c.clang-tidy.touch \
+ $(_MANDIR)/man2/setns.2.d/setns.c.lint-c.clang-tidy.touch \
+ $(_MANDIR)/man2/shmop.2.d/svshm_string_read.c.lint-c.clang-tidy.touch \
+ $(_MANDIR)/man2/shmop.2.d/svshm_string_write.c.lint-c.clang-tidy.touch \
+ $(_MANDIR)/man2/sigaction.2.d/sigaction.c.lint-c.clang-tidy.touch \
+ $(_MANDIR)/man2/spu_run.2.d/spu_run.c.lint-c.clang-tidy.touch \
+ $(_MANDIR)/man2/stat.2.d/stat.c.lint-c.clang-tidy.touch \
+ $(_MANDIR)/man2/_syscall.2.d/_syscall.c.lint-c.clang-tidy.touch \
+ $(_MANDIR)/man2/syscall.2.d/syscall.c.lint-c.clang-tidy.touch \
+ $(_MANDIR)/man2/sysctl.2.d/sysctl.c.lint-c.clang-tidy.touch \
+ $(_MANDIR)/man2/tee.2.d/tee.c.lint-c.clang-tidy.touch \
+ $(_MANDIR)/man2/timer_create.2.d/timer_create.c.lint-c.clang-tidy.touch \
+ $(_MANDIR)/man2/timerfd_create.2.d/timerfd_create.c.lint-c.clang-tidy.touch \
+ $(_MANDIR)/man2/unshare.2.d/unshare.c.lint-c.clang-tidy.touch \
+ $(_MANDIR)/man2/userfaultfd.2.d/userfaultfd.c.lint-c.clang-tidy.touch \
+ $(_MANDIR)/man2/wait.2.d/wait.c.lint-c.clang-tidy.touch \
+ $(_MANDIR)/man3/atexit.3.d/atexit.c.lint-c.clang-tidy.touch \
+ $(_MANDIR)/man3/backtrace.3.d/backtrace.c.lint-c.clang-tidy.touch \
+ $(_MANDIR)/man3/bsearch.3.d/bsearch.c.lint-c.clang-tidy.touch \
+ $(_MANDIR)/man3/bswap.3.d/bswap.c.lint-c.clang-tidy.touch \
+ $(_MANDIR)/man3/cacos.3.d/cacos.c.lint-c.clang-tidy.touch \
+ $(_MANDIR)/man3/cacosh.3.d/cacosh.c.lint-c.clang-tidy.touch \
+ $(_MANDIR)/man3/catan.3.d/catan.c.lint-c.clang-tidy.touch \
+ $(_MANDIR)/man3/catanh.3.d/catanh.c.lint-c.clang-tidy.touch \
+ $(_MANDIR)/man3/circleq.3.d/circleq.c.lint-c.clang-tidy.touch \
+ $(_MANDIR)/man3/clock_getcpuclockid.3.d/clock_getcpuclockid.c.lint-c.clang-tidy.touch \
+ $(_MANDIR)/man3/CPU_SET.3.d/CPU_SET.c.lint-c.clang-tidy.touch \
+ $(_MANDIR)/man3/dl_iterate_phdr.3.d/dl_iterate_phdr.c.lint-c.clang-tidy.touch \
+ $(_MANDIR)/man3/dlinfo.3.d/dlinfo.c.lint-c.clang-tidy.touch \
+ $(_MANDIR)/man3/duplocale.3.d/duplocale.c.lint-c.clang-tidy.touch \
+ $(_MANDIR)/man3/encrypt.3.d/encrypt.c.lint-c.clang-tidy.touch \
+ $(_MANDIR)/man3/end.3.d/end.c.lint-c.clang-tidy.touch \
+ $(_MANDIR)/man3/endian.3.d/endian.c.lint-c.clang-tidy.touch \
+ $(_MANDIR)/man3/envz_add.3.d/envz_add.c.lint-c.clang-tidy.touch \
+ $(_MANDIR)/man3/fmemopen.3.d/fmemopen.c.lint-c.clang-tidy.touch \
+ $(_MANDIR)/man3/fopencookie.3.d/fopencookie.c.lint-c.clang-tidy.touch \
+ $(_MANDIR)/man3/fread.3.d/fread.c.lint-c.clang-tidy.touch \
+ $(_MANDIR)/man3/frexp.3.d/frexp.c.lint-c.clang-tidy.touch \
+ $(_MANDIR)/man3/ftw.3.d/ftw.c.lint-c.clang-tidy.touch \
+ $(_MANDIR)/man3/_Generic.3.d/_Generic.c.lint-c.clang-tidy.touch \
+ $(_MANDIR)/man3/getaddrinfo.3.d/client.c.lint-c.clang-tidy.touch \
+ $(_MANDIR)/man3/getaddrinfo.3.d/server.c.lint-c.clang-tidy.touch \
+ $(_MANDIR)/man3/getaddrinfo_a.3.d/async.c.lint-c.clang-tidy.touch \
+ $(_MANDIR)/man3/getaddrinfo_a.3.d/sync.c.lint-c.clang-tidy.touch \
+ $(_MANDIR)/man3/getdate.3.d/getdate.c.lint-c.clang-tidy.touch \
+ $(_MANDIR)/man3/getgrent_r.3.d/getgrent_r.c.lint-c.clang-tidy.touch \
+ $(_MANDIR)/man3/getgrouplist.3.d/getgrouplist.c.lint-c.clang-tidy.touch \
+ $(_MANDIR)/man3/getline.3.d/getline.c.lint-c.clang-tidy.touch \
+ $(_MANDIR)/man3/getopt.3.d/getopt.c.lint-c.clang-tidy.touch \
+ $(_MANDIR)/man3/getopt.3.d/getopt_long.c.lint-c.clang-tidy.touch \
+ $(_MANDIR)/man3/getprotoent_r.3.d/getprotoent_r.c.lint-c.clang-tidy.touch \
+ $(_MANDIR)/man3/getpwnam.3.d/getpwnam.c.lint-c.clang-tidy.touch \
+ $(_MANDIR)/man3/getservent_r.3.d/getservent_r.c.lint-c.clang-tidy.touch \
+ $(_MANDIR)/man3/getsubopt.3.d/getsubopt.c.lint-c.clang-tidy.touch \
+ $(_MANDIR)/man3/getutent.3.d/getutent.c.lint-c.clang-tidy.touch \
+ $(_MANDIR)/man3/hsearch.3.d/hsearch.c.lint-c.clang-tidy.touch \
+ $(_MANDIR)/man3/if_nameindex.3.d/if_nameindex.c.lint-c.clang-tidy.touch \
+ $(_MANDIR)/man3/inet.3.d/inet.c.lint-c.clang-tidy.touch \
+ $(_MANDIR)/man3/inet_net_pton.3.d/inet_net_pton.c.lint-c.clang-tidy.touch \
+ $(_MANDIR)/man3/inet_pton.3.d/inet_pton.c.lint-c.clang-tidy.touch \
+ $(_MANDIR)/man3/insque.3.d/insque.c.lint-c.clang-tidy.touch \
+ $(_MANDIR)/man3/list.3.d/list.c.lint-c.clang-tidy.touch \
+ $(_MANDIR)/man3/mallinfo.3.d/mallinfo.c.lint-c.clang-tidy.touch \
+ $(_MANDIR)/man3/malloc_info.3.d/malloc_info.c.lint-c.clang-tidy.touch \
+ $(_MANDIR)/man3/mallopt.3.d/mallopt.c.lint-c.clang-tidy.touch \
+ $(_MANDIR)/man3/matherr.3.d/matherr.c.lint-c.clang-tidy.touch \
+ $(_MANDIR)/man3/MAX.3.d/MAX.c.lint-c.clang-tidy.touch \
+ $(_MANDIR)/man3/mbstowcs.3.d/mbstowcs.c.lint-c.clang-tidy.touch \
+ $(_MANDIR)/man3/mq_getattr.3.d/mq_getattr.c.lint-c.clang-tidy.touch \
+ $(_MANDIR)/man3/mq_notify.3.d/mq_notify.c.lint-c.clang-tidy.touch \
+ $(_MANDIR)/man3/newlocale.3.d/newlocale.c.lint-c.clang-tidy.touch \
+ $(_MANDIR)/man3/offsetof.3.d/offsetof.c.lint-c.clang-tidy.touch \
+ $(_MANDIR)/man3/posix_spawn.3.d/posix_spawn.c.lint-c.clang-tidy.touch \
+ $(_MANDIR)/man3/__ppc_get_timebase.3.d/__ppc_get_timebase.c.lint-c.clang-tidy.touch \
+ $(_MANDIR)/man3/pthread_attr_init.3.d/pthread_attr_init.c.lint-c.clang-tidy.touch \
+ $(_MANDIR)/man3/pthread_cleanup_push.3.d/pthread_cleanup_push.c.lint-c.clang-tidy.touch \
+ $(_MANDIR)/man3/pthread_create.3.d/pthread_create.c.lint-c.clang-tidy.touch \
+ $(_MANDIR)/man3/pthread_getattr_np.3.d/pthread_getattr_np.c.lint-c.clang-tidy.touch \
+ $(_MANDIR)/man3/pthread_setname_np.3.d/pthread_setname_np.c.lint-c.clang-tidy.touch \
+ $(_MANDIR)/man3/pthread_setschedparam.3.d/pthreads_sched_test.c.lint-c.clang-tidy.touch \
+ $(_MANDIR)/man3/qsort.3.d/qsort.c.lint-c.clang-tidy.touch \
+ $(_MANDIR)/man3/rand.3.d/rand.c.lint-c.clang-tidy.touch \
+ $(_MANDIR)/man3/rpmatch.3.d/rpmatch.c.lint-c.clang-tidy.touch \
+ $(_MANDIR)/man3/rtime.3.d/rtime.c.lint-c.clang-tidy.touch \
+ $(_MANDIR)/man3/scandir.3.d/scandir.c.lint-c.clang-tidy.touch \
+ $(_MANDIR)/man3/sem_wait.3.d/sem_wait.c.lint-c.clang-tidy.touch \
+ $(_MANDIR)/man3/setbuf.3.d/setbuf.c.lint-c.clang-tidy.touch \
+ $(_MANDIR)/man3/shm_open.3.d/pshm_ucase_bounce.c.lint-c.clang-tidy.touch \
+ $(_MANDIR)/man3/shm_open.3.d/pshm_ucase_send.c.lint-c.clang-tidy.touch \
+ $(_MANDIR)/man3/slist.3.d/slist.c.lint-c.clang-tidy.touch \
+ $(_MANDIR)/man3/stailq.3.d/stailq.c.lint-c.clang-tidy.touch \
+ $(_MANDIR)/man3/static_assert.3.d/must_be.c.lint-c.clang-tidy.touch \
+ $(_MANDIR)/man3/stpncpy.3.d/stpncpy.c.lint-c.clang-tidy.touch \
+ $(_MANDIR)/man3/strcmp.3.d/string_comp.c.lint-c.clang-tidy.touch \
+ $(_MANDIR)/man3/strcpy.3.d/strcpy.c.lint-c.clang-tidy.touch \
+ $(_MANDIR)/man3/strftime.3.d/strftime.c.lint-c.clang-tidy.touch \
+ $(_MANDIR)/man3/strsep.3.d/strsep.c.lint-c.clang-tidy.touch \
+ $(_MANDIR)/man3/strtok.3.d/strtok.c.lint-c.clang-tidy.touch \
+ $(_MANDIR)/man3/strtol.3.d/strtol.c.lint-c.clang-tidy.touch \
+ $(_MANDIR)/man3/strverscmp.3.d/strverscmp.c.lint-c.clang-tidy.touch \
+ $(_MANDIR)/man3/tailq.3.d/tailq.c.lint-c.clang-tidy.touch \
+ $(_MANDIR)/man3/tsearch.3.d/tsearch.c.lint-c.clang-tidy.touch \
+ $(_MANDIR)/man3/wordexp.3.d/wordexp.c.lint-c.clang-tidy.touch \
+ $(_MANDIR)/man3const/EXIT_SUCCESS.3const.d/EXIT_SUCCESS.c.lint-c.clang-tidy.touch \
+ $(_MANDIR)/man3head/printf.h.3head.d/register_printf_specifier.c.lint-c.clang-tidy.touch
+
+
+_LINT_c_EX_clang_tidy := $(patsubst %, %.lint-c.clang-tidy.touch, $(_EX_TU_src))
ifeq ($(SKIP_XFAIL),yes)
-_LINT_c_clang_tidy := $(filter-out $(_XFAIL_LINT_c_clang_tidy), $(_LINT_c_clang_tidy))
+_LINT_c_EX_clang_tidy := $(filter-out $(_XFAIL_LINT_c_EX_clang_tidy), $(_LINT_c_EX_clang_tidy))
endif
+_LINT_c_clang_tidy := $(_LINT_c_EX_clang_tidy)
+
+
+$(_LINT_c_EX_clang_tidy): %.lint-c.clang-tidy.touch: %
+$(_LINT_c_clang_tidy): $(CLANG_TIDY_CONF) $(MK) | $$(@D)/
-$(_LINT_c_clang_tidy): %.lint-c.clang-tidy.touch: %.c $(CLANG_TIDY_CONF) $(MK)
+$(_LINT_c_clang_tidy):
$(info $(INFO_)CLANG_TIDY $@)
$(CLANG_TIDY) $(CLANG_TIDYFLAGS) $< -- $(CPPFLAGS) $(CLANGFLAGS) 2>&1 \
| $(SED) '/generated\.$$/d' >&2
diff --git a/share/mk/lint/c/cppcheck.mk b/share/mk/lint/c/cppcheck.mk
index 5fa74ac..333baf7 100644
--- a/share/mk/lint/c/cppcheck.mk
+++ b/share/mk/lint/c/cppcheck.mk
@@ -8,60 +8,65 @@ MAKEFILE_LINT_C_CPPCHECK_INCLUDED := 1
include $(MAKEFILEDIR)/build/_.mk
include $(MAKEFILEDIR)/build/examples/src.mk
-include $(MAKEFILEDIR)/configure/build-depends/coreutils.mk
-include $(MAKEFILEDIR)/configure/build-depends/cppcheck.mk
+include $(MAKEFILEDIR)/configure/build-depends/coreutils/touch.mk
+include $(MAKEFILEDIR)/configure/build-depends/cppcheck/cppcheck.mk
include $(MAKEFILEDIR)/configure/xfail.mk
-_XFAIL_LINT_c_cppcheck := \
- $(_MANDIR)/man2/chown.2.d/chown.lint-c.cppcheck.touch \
- $(_MANDIR)/man2/close_range.2.d/close_range.lint-c.cppcheck.touch \
- $(_MANDIR)/man2/kcmp.2.d/kcmp.lint-c.cppcheck.touch \
- $(_MANDIR)/man2/keyctl.2.d/key_instantiate.lint-c.cppcheck.touch \
- $(_MANDIR)/man2/memfd_create.2.d/t_memfd_create.lint-c.cppcheck.touch \
- $(_MANDIR)/man2/msgop.2.d/msgop.lint-c.cppcheck.touch \
- $(_MANDIR)/man2/open_by_handle_at.2.d/t_open_by_handle_at.lint-c.cppcheck.touch \
- $(_MANDIR)/man2/shmop.2.d/svshm_string_read.lint-c.cppcheck.touch \
- $(_MANDIR)/man2/unshare.2.d/unshare.lint-c.cppcheck.touch \
- $(_MANDIR)/man3/bsearch.3.d/bsearch.lint-c.cppcheck.touch \
- $(_MANDIR)/man3/dl_iterate_phdr.3.d/dl_iterate_phdr.lint-c.cppcheck.touch \
- $(_MANDIR)/man3/dlopen.3.d/dlopen.lint-c.cppcheck.touch \
- $(_MANDIR)/man3/encrypt.3.d/encrypt.lint-c.cppcheck.touch \
- $(_MANDIR)/man3/envz_add.3.d/envz_add.lint-c.cppcheck.touch \
- $(_MANDIR)/man3/getaddrinfo_a.3.d/async.lint-c.cppcheck.touch \
- $(_MANDIR)/man3/getdate.3.d/getdate.lint-c.cppcheck.touch \
- $(_MANDIR)/man3/getgrouplist.3.d/getgrouplist.lint-c.cppcheck.touch \
- $(_MANDIR)/man3/hsearch.3.d/hsearch.lint-c.cppcheck.touch \
- $(_MANDIR)/man3/malloc_info.3.d/malloc_info.lint-c.cppcheck.touch \
- $(_MANDIR)/man3/mallopt.3.d/mallopt.lint-c.cppcheck.touch \
- $(_MANDIR)/man3/matherr.3.d/matherr.lint-c.cppcheck.touch \
- $(_MANDIR)/man3/mcheck.3.d/mcheck.lint-c.cppcheck.touch \
- $(_MANDIR)/man3/mtrace.3.d/t_mtrace.lint-c.cppcheck.touch \
- $(_MANDIR)/man3/newlocale.3.d/newlocale.lint-c.cppcheck.touch \
- $(_MANDIR)/man3/pthread_attr_init.3.d/pthread_attr_init.lint-c.cppcheck.touch \
- $(_MANDIR)/man3/pthread_create.3.d/pthread_create.lint-c.cppcheck.touch \
- $(_MANDIR)/man3/pthread_getattr_np.3.d/pthread_getattr_np.lint-c.cppcheck.touch \
- $(_MANDIR)/man3/pthread_getcpuclockid.3.d/pthread_getcpuclockid.lint-c.cppcheck.touch \
- $(_MANDIR)/man3/pthread_setschedparam.3.d/pthreads_sched_test.lint-c.cppcheck.touch \
- $(_MANDIR)/man3/setaliasent.3.d/setaliasent.lint-c.cppcheck.touch \
- $(_MANDIR)/man3/setbuf.3.d/setbuf.lint-c.cppcheck.touch \
- $(_MANDIR)/man3/shm_open.3.d/pshm_ucase_send.lint-c.cppcheck.touch \
- $(_MANDIR)/man3/stpncpy.3.d/stpncpy.lint-c.cppcheck.touch \
- $(_MANDIR)/man3/strftime.3.d/strftime.lint-c.cppcheck.touch \
- $(_MANDIR)/man3/strncat.3.d/strncat.lint-c.cppcheck.touch \
- $(_MANDIR)/man3/strsep.3.d/strsep.lint-c.cppcheck.touch \
- $(_MANDIR)/man3/strtok.3.d/strtok.lint-c.cppcheck.touch \
- $(_MANDIR)/man3/strtol.3.d/strtol.lint-c.cppcheck.touch \
- $(_MANDIR)/man3/tsearch.3.d/tsearch.lint-c.cppcheck.touch
-
-
-_LINT_c_cppcheck := $(patsubst %.c, %.lint-c.cppcheck.touch, $(_UNITS_ex_c))
+_XFAIL_LINT_c_EX_cppcheck := \
+ $(_MANDIR)/man2/chown.2.d/chown.c.lint-c.cppcheck.touch \
+ $(_MANDIR)/man2/close_range.2.d/close_range.c.lint-c.cppcheck.touch \
+ $(_MANDIR)/man2/kcmp.2.d/kcmp.c.lint-c.cppcheck.touch \
+ $(_MANDIR)/man2/keyctl.2.d/key_instantiate.c.lint-c.cppcheck.touch \
+ $(_MANDIR)/man2/memfd_create.2.d/t_memfd_create.c.lint-c.cppcheck.touch \
+ $(_MANDIR)/man2/msgop.2.d/msgop.c.lint-c.cppcheck.touch \
+ $(_MANDIR)/man2/open_by_handle_at.2.d/t_open_by_handle_at.c.lint-c.cppcheck.touch \
+ $(_MANDIR)/man2/shmop.2.d/svshm_string_read.c.lint-c.cppcheck.touch \
+ $(_MANDIR)/man2/unshare.2.d/unshare.c.lint-c.cppcheck.touch \
+ $(_MANDIR)/man3/bsearch.3.d/bsearch.c.lint-c.cppcheck.touch \
+ $(_MANDIR)/man3/dl_iterate_phdr.3.d/dl_iterate_phdr.c.lint-c.cppcheck.touch \
+ $(_MANDIR)/man3/dlopen.3.d/dlopen.c.lint-c.cppcheck.touch \
+ $(_MANDIR)/man3/encrypt.3.d/encrypt.c.lint-c.cppcheck.touch \
+ $(_MANDIR)/man3/envz_add.3.d/envz_add.c.lint-c.cppcheck.touch \
+ $(_MANDIR)/man3/getaddrinfo_a.3.d/async.c.lint-c.cppcheck.touch \
+ $(_MANDIR)/man3/getdate.3.d/getdate.c.lint-c.cppcheck.touch \
+ $(_MANDIR)/man3/getgrouplist.3.d/getgrouplist.c.lint-c.cppcheck.touch \
+ $(_MANDIR)/man3/hsearch.3.d/hsearch.c.lint-c.cppcheck.touch \
+ $(_MANDIR)/man3/malloc_info.3.d/malloc_info.c.lint-c.cppcheck.touch \
+ $(_MANDIR)/man3/mallopt.3.d/mallopt.c.lint-c.cppcheck.touch \
+ $(_MANDIR)/man3/matherr.3.d/matherr.c.lint-c.cppcheck.touch \
+ $(_MANDIR)/man3/mcheck.3.d/mcheck.c.lint-c.cppcheck.touch \
+ $(_MANDIR)/man3/mtrace.3.d/t_mtrace.c.lint-c.cppcheck.touch \
+ $(_MANDIR)/man3/newlocale.3.d/newlocale.c.lint-c.cppcheck.touch \
+ $(_MANDIR)/man3/pthread_attr_init.3.d/pthread_attr_init.c.lint-c.cppcheck.touch \
+ $(_MANDIR)/man3/pthread_create.3.d/pthread_create.c.lint-c.cppcheck.touch \
+ $(_MANDIR)/man3/pthread_getattr_np.3.d/pthread_getattr_np.c.lint-c.cppcheck.touch \
+ $(_MANDIR)/man3/pthread_getcpuclockid.3.d/pthread_getcpuclockid.c.lint-c.cppcheck.touch \
+ $(_MANDIR)/man3/pthread_setschedparam.3.d/pthreads_sched_test.c.lint-c.cppcheck.touch \
+ $(_MANDIR)/man3/setaliasent.3.d/setaliasent.c.lint-c.cppcheck.touch \
+ $(_MANDIR)/man3/setbuf.3.d/setbuf.c.lint-c.cppcheck.touch \
+ $(_MANDIR)/man3/shm_open.3.d/pshm_ucase_send.c.lint-c.cppcheck.touch \
+ $(_MANDIR)/man3/stpncpy.3.d/stpncpy.c.lint-c.cppcheck.touch \
+ $(_MANDIR)/man3/strftime.3.d/strftime.c.lint-c.cppcheck.touch \
+ $(_MANDIR)/man3/strncat.3.d/strncat.c.lint-c.cppcheck.touch \
+ $(_MANDIR)/man3/strsep.3.d/strsep.c.lint-c.cppcheck.touch \
+ $(_MANDIR)/man3/strtok.3.d/strtok.c.lint-c.cppcheck.touch \
+ $(_MANDIR)/man3/strtol.3.d/strtol.c.lint-c.cppcheck.touch \
+ $(_MANDIR)/man3/tsearch.3.d/tsearch.c.lint-c.cppcheck.touch
+
+
+_LINT_c_EX_cppcheck := $(patsubst %, %.lint-c.cppcheck.touch, $(_EX_TU_src))
ifeq ($(SKIP_XFAIL),yes)
-_LINT_c_cppcheck := $(filter-out $(_XFAIL_LINT_c_cppcheck), $(_LINT_c_cppcheck))
+_LINT_c_EX_cppcheck := $(filter-out $(_XFAIL_LINT_c_EX_cppcheck), $(_LINT_c_EX_cppcheck))
endif
+_LINT_c_cppcheck := $(_LINT_c_EX_cppcheck)
+
+
+$(_LINT_c_EX_cppcheck): %.lint-c.cppcheck.touch: %
+$(_LINT_c_cppcheck): $(CPPCHECK_SUPPRESS) $(MK) | $$(@D)/
-$(_LINT_c_cppcheck): %.lint-c.cppcheck.touch: %.c $(CPPCHECK_SUPPRESS) $(MK)
+$(_LINT_c_EX_cppcheck):
$(info $(INFO_)CPPCHECK $@)
$(CPPCHECK) $(CPPCHECKFLAGS) $<
$(TOUCH) $@
diff --git a/share/mk/lint/c/cpplint.mk b/share/mk/lint/c/cpplint.mk
index 8eb3984..5e07488 100644
--- a/share/mk/lint/c/cpplint.mk
+++ b/share/mk/lint/c/cpplint.mk
@@ -7,14 +7,19 @@ MAKEFILE_LINT_C_CPPLINT_INCLUDED := 1
include $(MAKEFILEDIR)/build/examples/src.mk
-include $(MAKEFILEDIR)/configure/build-depends/coreutils.mk
-include $(MAKEFILEDIR)/configure/build-depends/cpplint.mk
+include $(MAKEFILEDIR)/configure/build-depends/coreutils/touch.mk
+include $(MAKEFILEDIR)/configure/build-depends/cpplint/cpplint.mk
-_LINT_c_cpplint := $(patsubst %.c, %.lint-c.cpplint.touch, $(_UNITS_ex_c))
+_LINT_c_EX_cpplint := $(patsubst %, %.lint-c.cpplint.touch, $(_EX_TU_src))
+_LINT_c_cpplint := $(_LINT_c_EX_cpplint)
-$(_LINT_c_cpplint): %.lint-c.cpplint.touch: %.c $(CPPLINT_CONF) $(MK)
+$(_LINT_c_EX_cpplint): %.lint-c.cpplint.touch: %
+$(_LINT_c_cpplint): $(CPPLINT_CONF) $(MK) | $$(@D)/
+
+
+$(_LINT_c_cpplint):
$(info $(INFO_)CPPLINT $@)
$(CPPLINT) $(CPPLINTFLAGS) $< >/dev/null
$(TOUCH) $@
diff --git a/share/mk/lint/c/iwyu.mk b/share/mk/lint/c/iwyu.mk
index 32c2c07..b2473a6 100644
--- a/share/mk/lint/c/iwyu.mk
+++ b/share/mk/lint/c/iwyu.mk
@@ -8,88 +8,98 @@ MAKEFILE_LINT_C_IWYU_INCLUDED := 1
include $(MAKEFILEDIR)/build/_.mk
include $(MAKEFILEDIR)/build/examples/src.mk
-include $(MAKEFILEDIR)/configure/build-depends/clang.mk
-include $(MAKEFILEDIR)/configure/build-depends/coreutils.mk
-include $(MAKEFILEDIR)/configure/build-depends/cpp.mk
-include $(MAKEFILEDIR)/configure/build-depends/grep.mk
-include $(MAKEFILEDIR)/configure/build-depends/iwyu.mk
-include $(MAKEFILEDIR)/configure/build-depends/sed.mk
+include $(MAKEFILEDIR)/configure/build-depends/clang/clang.mk
+include $(MAKEFILEDIR)/configure/build-depends/coreutils/tac.mk
+include $(MAKEFILEDIR)/configure/build-depends/coreutils/touch.mk
+include $(MAKEFILEDIR)/configure/build-depends/coreutils/true.mk
+include $(MAKEFILEDIR)/configure/build-depends/cpp/cpp.mk
+include $(MAKEFILEDIR)/configure/build-depends/grep/grep.mk
+include $(MAKEFILEDIR)/configure/build-depends/iwyu/iwyu.mk
+include $(MAKEFILEDIR)/configure/build-depends/sed/sed.mk
include $(MAKEFILEDIR)/configure/xfail.mk
-_XFAIL_LINT_c_iwyu := \
- $(_MANDIR)/man2/clock_getres.2.d/clock_getres.lint-c.iwyu.touch \
- $(_MANDIR)/man2/getrlimit.2.d/getrlimit.lint-c.iwyu.touch \
- $(_MANDIR)/man2/listxattr.2.d/listxattr.lint-c.iwyu.touch \
- $(_MANDIR)/man2/mount_setattr.2.d/mount_setattr.lint-c.iwyu.touch \
- $(_MANDIR)/man2/recvmmsg.2.d/recvmmsg.lint-c.iwyu.touch \
- $(_MANDIR)/man2/seccomp.2.d/seccomp.lint-c.iwyu.touch \
- $(_MANDIR)/man2/seccomp_unotify.2.d/seccomp_unotify.lint-c.iwyu.touch \
- $(_MANDIR)/man2/select.2.d/select.lint-c.iwyu.touch \
- $(_MANDIR)/man2/semget.2.d/t_semget.lint-c.iwyu.touch \
- $(_MANDIR)/man2/sendmmsg.2.d/sendmmsg.lint-c.iwyu.touch \
- $(_MANDIR)/man2/_syscall.2.d/_syscall.lint-c.iwyu.touch \
- $(_MANDIR)/man2/timer_create.2.d/timer_create.lint-c.iwyu.touch \
- $(_MANDIR)/man2/userfaultfd.2.d/userfaultfd.lint-c.iwyu.touch \
- $(_MANDIR)/man3/backtrace.3.d/backtrace.lint-c.iwyu.touch \
- $(_MANDIR)/man3/bsearch.3.d/bsearch.lint-c.iwyu.touch \
- $(_MANDIR)/man3/bswap.3.d/bswap.lint-c.iwyu.touch \
- $(_MANDIR)/man3/cacos.3.d/cacos.lint-c.iwyu.touch \
- $(_MANDIR)/man3/cacosh.3.d/cacosh.lint-c.iwyu.touch \
- $(_MANDIR)/man3/catan.3.d/catan.lint-c.iwyu.touch \
- $(_MANDIR)/man3/catanh.3.d/catanh.lint-c.iwyu.touch \
- $(_MANDIR)/man3/clock_getcpuclockid.3.d/clock_getcpuclockid.lint-c.iwyu.touch \
- $(_MANDIR)/man3/CPU_SET.3.d/CPU_SET.lint-c.iwyu.touch \
- $(_MANDIR)/man3/dl_iterate_phdr.3.d/dl_iterate_phdr.lint-c.iwyu.touch \
- $(_MANDIR)/man3/dlinfo.3.d/dlinfo.lint-c.iwyu.touch \
- $(_MANDIR)/man3/duplocale.3.d/duplocale.lint-c.iwyu.touch \
- $(_MANDIR)/man3/endian.3.d/endian.lint-c.iwyu.touch \
- $(_MANDIR)/man3/envz_add.3.d/envz_add.lint-c.iwyu.touch \
- $(_MANDIR)/man3/fopencookie.3.d/fopencookie.lint-c.iwyu.touch \
- $(_MANDIR)/man3/frexp.3.d/frexp.lint-c.iwyu.touch \
- $(_MANDIR)/man3/ftw.3.d/ftw.lint-c.iwyu.touch \
- $(_MANDIR)/man3/_Generic.3.d/_Generic.lint-c.iwyu.touch \
- $(_MANDIR)/man3/getaddrinfo.3.d/client.lint-c.iwyu.touch \
- $(_MANDIR)/man3/getaddrinfo.3.d/server.lint-c.iwyu.touch \
- $(_MANDIR)/man3/getgrouplist.3.d/getgrouplist.lint-c.iwyu.touch \
- $(_MANDIR)/man3/getline.3.d/getline.lint-c.iwyu.touch \
- $(_MANDIR)/man3/getopt.3.d/getopt_long.lint-c.iwyu.touch \
- $(_MANDIR)/man3/getprotoent_r.3.d/getprotoent_r.lint-c.iwyu.touch \
- $(_MANDIR)/man3/getservent_r.3.d/getservent_r.lint-c.iwyu.touch \
- $(_MANDIR)/man3/getsubopt.3.d/getsubopt.lint-c.iwyu.touch \
- $(_MANDIR)/man3/if_nameindex.3.d/if_nameindex.lint-c.iwyu.touch \
- $(_MANDIR)/man3/inet.3.d/inet.lint-c.iwyu.touch \
- $(_MANDIR)/man3/inet_net_pton.3.d/inet_net_pton.lint-c.iwyu.touch \
- $(_MANDIR)/man3/inet_pton.3.d/inet_pton.lint-c.iwyu.touch \
- $(_MANDIR)/man3/mallinfo.3.d/mallinfo.lint-c.iwyu.touch \
- $(_MANDIR)/man3/malloc_info.3.d/malloc_info.lint-c.iwyu.touch \
- $(_MANDIR)/man3/mbstowcs.3.d/mbstowcs.lint-c.iwyu.touch \
- $(_MANDIR)/man3/mq_getattr.3.d/mq_getattr.lint-c.iwyu.touch \
- $(_MANDIR)/man3/mq_notify.3.d/mq_notify.lint-c.iwyu.touch \
- $(_MANDIR)/man3/mtrace.3.d/t_mtrace.lint-c.iwyu.touch \
- $(_MANDIR)/man3/newlocale.3.d/newlocale.lint-c.iwyu.touch \
- $(_MANDIR)/man3/posix_spawn.3.d/posix_spawn.lint-c.iwyu.touch \
- $(_MANDIR)/man3/pthread_attr_init.3.d/pthread_attr_init.lint-c.iwyu.touch \
- $(_MANDIR)/man3/pthread_cleanup_push.3.d/pthread_cleanup_push.lint-c.iwyu.touch \
- $(_MANDIR)/man3/pthread_getattr_default_np.3.d/pthread_getattr_default_np.lint-c.iwyu.touch \
- $(_MANDIR)/man3/pthread_getattr_np.3.d/pthread_getattr_np.lint-c.iwyu.touch \
- $(_MANDIR)/man3/pthread_getcpuclockid.3.d/pthread_getcpuclockid.lint-c.iwyu.touch \
- $(_MANDIR)/man3/pthread_setaffinity_np.3.d/pthread_setaffinity_np.lint-c.iwyu.touch \
- $(_MANDIR)/man3/pthread_setname_np.3.d/pthread_setname_np.lint-c.iwyu.touch \
- $(_MANDIR)/man3/pthread_setschedparam.3.d/pthreads_sched_test.lint-c.iwyu.touch \
- $(_MANDIR)/man3/sem_wait.3.d/sem_wait.lint-c.iwyu.touch \
- $(_MANDIR)/man3/shm_open.3.d/pshm_ucase_bounce.lint-c.iwyu.touch \
- $(_MANDIR)/man3/shm_open.3.d/pshm_ucase_send.lint-c.iwyu.touch \
- $(_MANDIR)/man3/slist.3.d/slist.lint-c.iwyu.touch
-
-
-_LINT_c_iwyu := $(patsubst %.c, %.lint-c.iwyu.touch, $(_UNITS_ex_c))
+_XFAIL_LINT_c_EX_iwyu := \
+ $(_MANDIR)/man2/clock_getres.2.d/clock_getres.c.lint-c.iwyu.touch \
+ $(_MANDIR)/man2/getrlimit.2.d/getrlimit.c.lint-c.iwyu.touch \
+ $(_MANDIR)/man2/listxattr.2.d/listxattr.c.lint-c.iwyu.touch \
+ $(_MANDIR)/man2/mount_setattr.2.d/mount_setattr.c.lint-c.iwyu.touch \
+ $(_MANDIR)/man2/recvmmsg.2.d/recvmmsg.c.lint-c.iwyu.touch \
+ $(_MANDIR)/man2/seccomp.2.d/seccomp.c.lint-c.iwyu.touch \
+ $(_MANDIR)/man2/seccomp_unotify.2.d/seccomp_unotify.c.lint-c.iwyu.touch \
+ $(_MANDIR)/man2/select.2.d/select.c.lint-c.iwyu.touch \
+ $(_MANDIR)/man2/semget.2.d/t_semget.c.lint-c.iwyu.touch \
+ $(_MANDIR)/man2/sendmmsg.2.d/sendmmsg.c.lint-c.iwyu.touch \
+ $(_MANDIR)/man2/shmop.2.d/svshm_string.h.lint-c.iwyu.touch \
+ $(_MANDIR)/man2/_syscall.2.d/_syscall.c.lint-c.iwyu.touch \
+ $(_MANDIR)/man2/timer_create.2.d/timer_create.c.lint-c.iwyu.touch \
+ $(_MANDIR)/man2/userfaultfd.2.d/userfaultfd.c.lint-c.iwyu.touch \
+ $(_MANDIR)/man3/backtrace.3.d/backtrace.c.lint-c.iwyu.touch \
+ $(_MANDIR)/man3/bsearch.3.d/bsearch.c.lint-c.iwyu.touch \
+ $(_MANDIR)/man3/bswap.3.d/bswap.c.lint-c.iwyu.touch \
+ $(_MANDIR)/man3/cacos.3.d/cacos.c.lint-c.iwyu.touch \
+ $(_MANDIR)/man3/cacosh.3.d/cacosh.c.lint-c.iwyu.touch \
+ $(_MANDIR)/man3/catan.3.d/catan.c.lint-c.iwyu.touch \
+ $(_MANDIR)/man3/catanh.3.d/catanh.c.lint-c.iwyu.touch \
+ $(_MANDIR)/man3/clock_getcpuclockid.3.d/clock_getcpuclockid.c.lint-c.iwyu.touch \
+ $(_MANDIR)/man3/CPU_SET.3.d/CPU_SET.c.lint-c.iwyu.touch \
+ $(_MANDIR)/man3/dl_iterate_phdr.3.d/dl_iterate_phdr.c.lint-c.iwyu.touch \
+ $(_MANDIR)/man3/dlinfo.3.d/dlinfo.c.lint-c.iwyu.touch \
+ $(_MANDIR)/man3/duplocale.3.d/duplocale.c.lint-c.iwyu.touch \
+ $(_MANDIR)/man3/endian.3.d/endian.c.lint-c.iwyu.touch \
+ $(_MANDIR)/man3/envz_add.3.d/envz_add.c.lint-c.iwyu.touch \
+ $(_MANDIR)/man3/fopencookie.3.d/fopencookie.c.lint-c.iwyu.touch \
+ $(_MANDIR)/man3/frexp.3.d/frexp.c.lint-c.iwyu.touch \
+ $(_MANDIR)/man3/ftw.3.d/ftw.c.lint-c.iwyu.touch \
+ $(_MANDIR)/man3/_Generic.3.d/_Generic.c.lint-c.iwyu.touch \
+ $(_MANDIR)/man3/getaddrinfo.3.d/client.c.lint-c.iwyu.touch \
+ $(_MANDIR)/man3/getaddrinfo.3.d/server.c.lint-c.iwyu.touch \
+ $(_MANDIR)/man3/getgrouplist.3.d/getgrouplist.c.lint-c.iwyu.touch \
+ $(_MANDIR)/man3/getline.3.d/getline.c.lint-c.iwyu.touch \
+ $(_MANDIR)/man3/getopt.3.d/getopt_long.c.lint-c.iwyu.touch \
+ $(_MANDIR)/man3/getprotoent_r.3.d/getprotoent_r.c.lint-c.iwyu.touch \
+ $(_MANDIR)/man3/getservent_r.3.d/getservent_r.c.lint-c.iwyu.touch \
+ $(_MANDIR)/man3/getsubopt.3.d/getsubopt.c.lint-c.iwyu.touch \
+ $(_MANDIR)/man3/if_nameindex.3.d/if_nameindex.c.lint-c.iwyu.touch \
+ $(_MANDIR)/man3/inet.3.d/inet.c.lint-c.iwyu.touch \
+ $(_MANDIR)/man3/inet_net_pton.3.d/inet_net_pton.c.lint-c.iwyu.touch \
+ $(_MANDIR)/man3/inet_pton.3.d/inet_pton.c.lint-c.iwyu.touch \
+ $(_MANDIR)/man3/mallinfo.3.d/mallinfo.c.lint-c.iwyu.touch \
+ $(_MANDIR)/man3/malloc_info.3.d/malloc_info.c.lint-c.iwyu.touch \
+ $(_MANDIR)/man3/mbstowcs.3.d/mbstowcs.c.lint-c.iwyu.touch \
+ $(_MANDIR)/man3/mq_getattr.3.d/mq_getattr.c.lint-c.iwyu.touch \
+ $(_MANDIR)/man3/mq_notify.3.d/mq_notify.c.lint-c.iwyu.touch \
+ $(_MANDIR)/man3/mtrace.3.d/t_mtrace.c.lint-c.iwyu.touch \
+ $(_MANDIR)/man3/newlocale.3.d/newlocale.c.lint-c.iwyu.touch \
+ $(_MANDIR)/man3/posix_spawn.3.d/posix_spawn.c.lint-c.iwyu.touch \
+ $(_MANDIR)/man3/pthread_attr_init.3.d/pthread_attr_init.c.lint-c.iwyu.touch \
+ $(_MANDIR)/man3/pthread_cleanup_push.3.d/pthread_cleanup_push.c.lint-c.iwyu.touch \
+ $(_MANDIR)/man3/pthread_getattr_default_np.3.d/pthread_getattr_default_np.c.lint-c.iwyu.touch \
+ $(_MANDIR)/man3/pthread_getattr_np.3.d/pthread_getattr_np.c.lint-c.iwyu.touch \
+ $(_MANDIR)/man3/pthread_getcpuclockid.3.d/pthread_getcpuclockid.c.lint-c.iwyu.touch \
+ $(_MANDIR)/man3/pthread_setaffinity_np.3.d/pthread_setaffinity_np.c.lint-c.iwyu.touch \
+ $(_MANDIR)/man3/pthread_setname_np.3.d/pthread_setname_np.c.lint-c.iwyu.touch \
+ $(_MANDIR)/man3/pthread_setschedparam.3.d/pthreads_sched_test.c.lint-c.iwyu.touch \
+ $(_MANDIR)/man3/pthread_sigmask.3.d/pthread_sigmask.c.lint-c.iwyu.touch \
+ $(_MANDIR)/man3/sem_wait.3.d/sem_wait.c.lint-c.iwyu.touch \
+ $(_MANDIR)/man3/shm_open.3.d/pshm_ucase.h.lint-c.iwyu.touch \
+ $(_MANDIR)/man3/shm_open.3.d/pshm_ucase_bounce.c.lint-c.iwyu.touch \
+ $(_MANDIR)/man3/shm_open.3.d/pshm_ucase_send.c.lint-c.iwyu.touch \
+ $(_MANDIR)/man3/slist.3.d/slist.c.lint-c.iwyu.touch
+
+
+_LINT_c_EX_iwyu := $(patsubst %, %.lint-c.iwyu.touch, $(_EX_TU_src))
ifeq ($(SKIP_XFAIL),yes)
-_LINT_c_iwyu := $(filter-out $(_XFAIL_LINT_c_iwyu), $(_LINT_c_iwyu))
+_LINT_c_EX_iwyu := $(filter-out $(_XFAIL_LINT_c_EX_iwyu), $(_LINT_c_EX_iwyu))
endif
+_LINT_c_iwyu := $(_LINT_c_EX_iwyu)
+
+
+$(_LINT_c_EX_iwyu): %.lint-c.iwyu.touch: %
+$(_LINT_c_iwyu): $(MK) | $$(@D)/
-$(_LINT_c_iwyu): %.lint-c.iwyu.touch: %.c $(MK)
+$(_LINT_c_iwyu):
$(info $(INFO_)IWYU $@)
! ($(IWYU) $(IWYUFLAGS) $(CPPFLAGS) $(CLANGFLAGS) $< 2>&1 \
| $(SED) -n '/should add these lines:/,$$p' \
diff --git a/share/mk/lint/man/mandoc.ignore.grep b/share/mk/lint/man/mandoc.ignore.grep
index a2f91bc..c4a023a 100644
--- a/share/mk/lint/man/mandoc.ignore.grep
+++ b/share/mk/lint/man/mandoc.ignore.grep
@@ -1,6 +1,5 @@
STYLE: lower case character in document title:
UNSUPP: ignoring macro in table:
-WARNING: cannot parse date, using it verbatim: TH (date)
WARNING: empty block: UR
WARNING: missing date, using "": TH
WARNING: undefined escape, printing literally: \\\\
diff --git a/share/mk/lint/man/mandoc.mk b/share/mk/lint/man/mandoc.mk
index efa69ab..2a3f914 100644
--- a/share/mk/lint/man/mandoc.mk
+++ b/share/mk/lint/man/mandoc.mk
@@ -7,13 +7,12 @@ MAKEFILE_LINT_MAN_MANDOC_INCLUDED := 1
include $(MAKEFILEDIR)/build/_.mk
-include $(MAKEFILEDIR)/configure/build-depends/coreutils.mk
-include $(MAKEFILEDIR)/configure/build-depends/grep.mk
-include $(MAKEFILEDIR)/configure/build-depends/mandoc.mk
-include $(MAKEFILEDIR)/configure/src.mk
+include $(MAKEFILEDIR)/build/man/man.mk
+include $(MAKEFILEDIR)/configure/build-depends/coreutils/touch.mk
+include $(MAKEFILEDIR)/configure/build-depends/coreutils/true.mk
+include $(MAKEFILEDIR)/configure/build-depends/grep/grep.mk
+include $(MAKEFILEDIR)/configure/build-depends/mandoc/mandoc.mk
include $(MAKEFILEDIR)/configure/xfail.mk
-include $(MAKEFILEDIR)/lint/man/_.mk
-include $(MAKEFILEDIR)/src.mk
_XFAIL_LINT_man_mandoc := \
@@ -26,8 +25,7 @@ _XFAIL_LINT_man_mandoc := \
$(_MANDIR)/man8/zic.8.lint-man.mandoc.touch
-_LINT_man_mandoc := \
- $(patsubst $(MANDIR)/%, $(_MANDIR)/%.lint-man.mandoc.touch, $(NONSO_MAN))
+_LINT_man_mandoc := $(patsubst %, %.lint-man.mandoc.touch, $(_NONSO_MAN))
ifeq ($(SKIP_XFAIL),yes)
_LINT_man_mandoc := $(filter-out $(_XFAIL_LINT_man_mandoc), $(_LINT_man_mandoc))
endif
@@ -36,7 +34,7 @@ endif
mandoc_man_ignore_grep := $(MAKEFILEDIR)/lint/man/mandoc.ignore.grep
-$(_LINT_man_mandoc): $(_MANDIR)/%.lint-man.mandoc.touch: $(MANDIR)/% $(mandoc_man_ignore_grep) $(MK) | $$(@D)/
+$(_LINT_man_mandoc): %.lint-man.mandoc.touch: % $(mandoc_man_ignore_grep) $(MK) | $$(@D)/
$(info $(INFO_)MANDOC $@)
! ($(MANDOC) -man $(MANDOCFLAGS) $< 2>&1 \
| $(GREP) -v -f '$(mandoc_man_ignore_grep)' \
diff --git a/share/mk/lint/man/tbl.mk b/share/mk/lint/man/tbl.mk
index 23e6eda..cb2dd46 100644
--- a/share/mk/lint/man/tbl.mk
+++ b/share/mk/lint/man/tbl.mk
@@ -6,34 +6,38 @@ ifndef MAKEFILE_LINT_MAN_TBL_INCLUDED
MAKEFILE_LINT_MAN_TBL_INCLUDED := 1
-include $(MAKEFILEDIR)/build/_.mk
-include $(MAKEFILEDIR)/configure/build-depends/coreutils.mk
-include $(MAKEFILEDIR)/configure/build-depends/grep.mk
-include $(MAKEFILEDIR)/configure/src.mk
-include $(MAKEFILEDIR)/lint/man/_.mk
-include $(MAKEFILEDIR)/src.mk
+include $(MAKEFILEDIR)/build/man/man.mk
+include $(MAKEFILEDIR)/configure/build-depends/coreutils/cat.mk
+include $(MAKEFILEDIR)/configure/build-depends/coreutils/echo.mk
+include $(MAKEFILEDIR)/configure/build-depends/coreutils/head.mk
+include $(MAKEFILEDIR)/configure/build-depends/coreutils/tail.mk
+include $(MAKEFILEDIR)/configure/build-depends/coreutils/touch.mk
+include $(MAKEFILEDIR)/configure/build-depends/grep/grep.mk
-_LINT_man_tbl := \
- $(patsubst $(MANDIR)/%, $(_MANDIR)/%.lint-man.tbl.touch, $(NONSO_MAN))
+_LINT_man_tbl := $(patsubst %, %.lint-man.tbl.touch, $(_NONSO_MAN))
-$(_LINT_man_tbl): $(_MANDIR)/%.lint-man.tbl.touch: $(MANDIR)/% $(MK) | $$(@D)/
+$(_LINT_man_tbl): %.lint-man.tbl.touch: % $(MK) | $$(@D)/
$(info $(INFO_)GREP $@)
- if $(GREP) -q '^\.TS$$' $< && ! $(HEAD) -n1 $< | $(GREP) -q '\\" t$$'; \
- then \
- >&2 $(ECHO) "$<:1: missing '\\\" t' comment:"; \
- >&2 $(HEAD) -n1 <$<; \
- exit 1; \
- fi
- if $(HEAD) -n1 $< | $(GREP) -q '\\" t$$' && ! $(GREP) -q '^\.TS$$' $<; \
- then \
- >&2 $(ECHO) "$<:1: spurious '\\\" t' comment:"; \
- >&2 $(HEAD) -n1 <$<; \
- exit 1; \
+ $(HEAD) -n1 <$< \
+ | if $(GREP) '\\" t$$' >/dev/null; then \
+ $(CAT) <$< \
+ | if ! $(GREP) '^\.TS$$' >/dev/null; then \
+ >&2 $(ECHO) "$<:1: spurious '\\\" t' comment:"; \
+ >&2 $(HEAD) -n1 <$<; \
+ exit 1; \
+ fi; \
+ else \
+ $(CAT) <$< \
+ | if $(GREP) '^\.TS$$' >/dev/null; then \
+ >&2 $(ECHO) "$<:1: missing '\\\" t' comment:"; \
+ >&2 $(HEAD) -n1 <$<; \
+ exit 1; \
+ fi; \
fi
- if $(TAIL) -n+2 <$< | $(GREP) -q '\\" t$$'; \
- then \
+ $(TAIL) -n+2 <$< \
+ | if $(GREP) '\\" t$$' >/dev/null; then \
>&2 $(ECHO) "$<: spurious '\\\" t' not in first line:"; \
>&2 $(GREP) -n '\\" t$$' $< /dev/null; \
exit 1; \
diff --git a/share/mk/lint/mdoc/_.mk b/share/mk/lint/mdoc/_.mk
index 0f51ee2..d151a80 100644
--- a/share/mk/lint/mdoc/_.mk
+++ b/share/mk/lint/mdoc/_.mk
@@ -6,26 +6,8 @@ ifndef MAKEFILE_LINT_MDOC_INCLUDED
MAKEFILE_LINT_MDOC_INCLUDED := 1
-include $(MAKEFILEDIR)/build/_.mk
-include $(MAKEFILEDIR)/configure/directory_variables.mk
-include $(MAKEFILEDIR)/src.mk
-
-
-linters_mdoc := mandoc
-
-
-$(foreach l, $(linters_mdoc), \
- $(eval _LINT_mdoc_$(l) := \
- $(patsubst $(MANDIR)/%, $(_MANDIR)/%.lint-mdoc.$(l).touch, \
- $(NONSO_MDOC))))
-
-
-$(foreach l, $(linters_mdoc), \
- $(eval .PHONY: lint-mdoc-$(l)))
-$(foreach l, $(linters_mdoc), \
- $(eval lint-mdoc-$(l): $(_LINT_mdoc_$(l));))
.PHONY: lint-mdoc
-lint-mdoc: $(foreach l, $(linters_mdoc), lint-mdoc-$(l));
+lint-mdoc: lint-mdoc-mandoc;
endif # include guard
diff --git a/share/mk/lint/mdoc/mandoc.mk b/share/mk/lint/mdoc/mandoc.mk
index 8b209b8..3a9e2cc 100644
--- a/share/mk/lint/mdoc/mandoc.mk
+++ b/share/mk/lint/mdoc/mandoc.mk
@@ -6,18 +6,20 @@ ifndef MAKEFILE_LINT_MDOC_MANDOC_INCLUDED
MAKEFILE_LINT_MDOC_MANDOC_INCLUDED := 1
-include $(MAKEFILEDIR)/build/_.mk
-include $(MAKEFILEDIR)/configure/build-depends/coreutils.mk
-include $(MAKEFILEDIR)/configure/build-depends/grep.mk
-include $(MAKEFILEDIR)/configure/build-depends/mandoc.mk
-include $(MAKEFILEDIR)/lint/mdoc/_.mk
-include $(MAKEFILEDIR)/src.mk
+include $(MAKEFILEDIR)/build/man/mdoc.mk
+include $(MAKEFILEDIR)/configure/build-depends/coreutils/touch.mk
+include $(MAKEFILEDIR)/configure/build-depends/coreutils/true.mk
+include $(MAKEFILEDIR)/configure/build-depends/grep/grep.mk
+include $(MAKEFILEDIR)/configure/build-depends/mandoc/mandoc.mk
+
+
+_LINT_mdoc_mandoc := $(patsubst %, %.lint-mdoc.mandoc.touch, $(_NONSO_MDOC))
mandoc_mdoc_ignore_grep := $(MAKEFILEDIR)/lint/mdoc/mandoc.ignore.grep
-$(_LINT_mdoc_mandoc): $(_MANDIR)/%.lint-mdoc.mandoc.touch: $(MANDIR)/% $(mandoc_mdoc_ignore_grep) | $$(@D)/
+$(_LINT_mdoc_mandoc): %.lint-mdoc.mandoc.touch: % $(mandoc_mdoc_ignore_grep) $(MK) | $$(@D)/
$(info $(INFO_)MANDOC $@)
! ($(MANDOC) -mdoc $(MANDOCFLAGS) $< 2>&1 \
| $(GREP) -v -f '$(mandoc_mdoc_ignore_grep)' \
@@ -27,4 +29,8 @@ $(_LINT_mdoc_mandoc): $(_MANDIR)/%.lint-mdoc.mandoc.touch: $(MANDIR)/% $(mandoc_
$(TOUCH) $@
+.PHONY: lint-mdoc-mandoc
+lint-mdoc-mandoc: $(_LINT_mdoc_mandoc);
+
+
endif # include guard
diff --git a/share/mk/src.mk b/share/mk/src/man.mk
index 20c0037..424655f 100644
--- a/share/mk/src.mk
+++ b/share/mk/src/man.mk
@@ -2,17 +2,16 @@
# SPDX-License-Identifier: LGPL-3.0-only WITH LGPL-3.0-linking-exception
-ifndef MAKEFILE_SRC_INCLUDED
-MAKEFILE_SRC_INCLUDED := 1
+ifndef MAKEFILE_SRC_MAN_INCLUDED
+MAKEFILE_SRC_MAN_INCLUDED := 1
-include $(MAKEFILEDIR)/configure/build-depends/findutils.mk
-include $(MAKEFILEDIR)/configure/build-depends/grep.mk
-include $(MAKEFILEDIR)/configure/build-depends/sed.mk
-include $(MAKEFILEDIR)/configure/src.mk
-
-
-SORTMAN := $(srcdir)/scripts/sortman
+include $(MAKEFILEDIR)/configure/build-depends/findutils/find.mk
+include $(MAKEFILEDIR)/configure/build-depends/findutils/xargs.mk
+include $(MAKEFILEDIR)/configure/build-depends/grep/grep.mk
+include $(MAKEFILEDIR)/configure/build-depends/sed/sed.mk
+include $(MAKEFILEDIR)/configure/directory_variables/src.mk
+include $(MAKEFILEDIR)/src/sortman.mk
MANEXT := \(\.[[:digit:]]\([[:alpha:]][[:alnum:]]*\)\?\>\|\.man\)\+\(\.man\|\.in\)*$
@@ -32,17 +31,14 @@ MANINTROPAGES := $(shell $(FIND) $(MANDIR)/* -type f \
$(foreach s, $(MANSECTIONS), \
- $(eval MAN$(s)DIR := $(MANDIR)/man$(s)))
-
-$(foreach s, $(MANSECTIONS), \
$(eval MAN$(s)PAGES := \
$(filter-out $(MANINTROPAGES), \
- $(filter $(MANDIR)/man$(s)/%, \
+ $(filter $(MAN$(s)DIR)/%, \
$(filter %.$(s), \
$(MANPAGES))))))
$(foreach s, $(MANSECTIONS), \
$(eval MAN$(s)INTROPAGE := \
- $(filter $(MANDIR)/man$(s)/%, \
+ $(filter $(MAN$(s)DIR)/%, \
$(filter %.$(s), \
$(MANINTROPAGES)))))
@@ -57,6 +53,7 @@ NONSO_MDOC := $(shell $(FIND) $(MANDIR)/* -type f \
| $(XARGS) $(GREP) -l '^\.Dt ' \
| $(SORTMAN) \
| $(SED) 's,:,\\:,g')
+SO_MAN := $(filter-out $(NONSO_MAN) $(NONSO_MDOC), $(MANPAGES))
endif # include guard
diff --git a/share/mk/src/sortman.mk b/share/mk/src/sortman.mk
new file mode 100644
index 0000000..730274b
--- /dev/null
+++ b/share/mk/src/sortman.mk
@@ -0,0 +1,12 @@
+# Copyright 2021-2024, Alejandro Colomar <alx@kernel.org>
+# SPDX-License-Identifier: LGPL-3.0-only WITH LGPL-3.0-linking-exception
+
+
+ifndef MAKEFILE_SRC_SORTMAN_INCLUDED
+MAKEFILE_SRC_SORTMAN_INCLUDED := 1
+
+
+SORTMAN := $(CURDIR)/scripts/sortman
+
+
+endif # include guard