summaryrefslogtreecommitdiffstats
path: root/share/mk/install/man.mk
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/install/man.mk
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/install/man.mk')
-rw-r--r--share/mk/install/man.mk64
1 files changed, 22 insertions, 42 deletions
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