summaryrefslogtreecommitdiffstats
path: root/share/mk/build/man
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-24 04:52:22 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-24 04:52:22 +0000
commit3d08cd331c1adcf0d917392f7e527b3f00511748 (patch)
tree312f0d1e1632f48862f044b8bb87e602dcffb5f9 /share/mk/build/man
parentAdding debian version 6.7-2. (diff)
downloadmanpages-3d08cd331c1adcf0d917392f7e527b3f00511748.tar.xz
manpages-3d08cd331c1adcf0d917392f7e527b3f00511748.zip
Merging upstream version 6.8.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'share/mk/build/man')
-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
4 files changed, 107 insertions, 0 deletions
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