summaryrefslogtreecommitdiffstats
path: root/share/mk/build
diff options
context:
space:
mode:
Diffstat (limited to '')
-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--[-rwxr-xr-x]share/mk/build/fonts/devpdf/download (renamed from scripts/LinuxManBook/devpdf/download)0
-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.roff (renamed from scripts/LinuxManBook/LMBfront.roff)0
-rwxr-xr-xshare/mk/build/pdf/book/prepare.pl (renamed from scripts/LinuxManBook/prepare.pl)12
-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
37 files changed, 461 insertions, 178 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/scripts/LinuxManBook/devpdf/download b/share/mk/build/fonts/devpdf/download
index e230c82..e230c82 100755..100644
--- a/scripts/LinuxManBook/devpdf/download
+++ b/share/mk/build/fonts/devpdf/download
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/scripts/LinuxManBook/LMBfront.roff b/share/mk/build/pdf/book/front.roff
index fdf1a98..fdf1a98 100644
--- a/scripts/LinuxManBook/LMBfront.roff
+++ b/share/mk/build/pdf/book/front.roff
diff --git a/scripts/LinuxManBook/prepare.pl b/share/mk/build/pdf/book/prepare.pl
index 735cfcf..a074082 100755
--- a/scripts/LinuxManBook/prepare.pl
+++ b/share/mk/build/pdf/book/prepare.pl
@@ -49,9 +49,10 @@ my $dir2=$dir;
$dir2=~tr[.][_];
my %files;
my %aliases;
-my %target;
-foreach my $al (`grep -E '^\\.so' $dir/man*/*`)
+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;
@@ -66,8 +67,11 @@ while (my ($k,$v)=each %aliases)
}
}
-foreach my $fn (glob "$dir/man*/*")
+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"];
}
@@ -78,7 +82,7 @@ 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 TINOR S\n";
+ 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);
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)