summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlejandro Colomar <alx@kernel.org>2023-04-12 14:43:00 +0200
committerAlejandro Colomar <alx@kernel.org>2023-04-12 14:52:42 +0200
commitb220bc5b0bcc73904715f387bca67d3ca7dd6e56 (patch)
treefbc72f67707d5dba962fcd17e067cb614a84034b
parent69ad95988f40648ea21d96f248ea54ab7ca082fa (diff)
*.mk: $Z: Support installing lzip(1) compressed pages
Suggested-by: Ralph Corderoy <ralph@inputplus.co.uk> Signed-off-by: Alejandro Colomar <alx@kernel.org>
-rw-r--r--Makefile2
-rw-r--r--lib/install-man.mk8
2 files changed, 8 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index 6931d7bce..09a1deef6 100644
--- a/Makefile
+++ b/Makefile
@@ -135,7 +135,7 @@ help-variables:
$(info V Define to non-empty string for verbose output)
$(info )
$(info LINK_PAGES How to install link pages. ["so", "symlink"])
- $(info Z Install pages compressed. ["", ".bz2", ".gz"])
+ $(info Z Install pages compressed. ["", ".bz2", ".gz", ".lz"])
$(info )
$(info DISTNAME $$(git describe))
$(info DISTVERSION /$$DISTNAME/s/man-pages-//)
diff --git a/lib/install-man.mk b/lib/install-man.mk
index d25062176..4e56bdb41 100644
--- a/lib/install-man.mk
+++ b/lib/install-man.mk
@@ -25,9 +25,10 @@ Z :=
ifeq ($(Z),)
else ifeq ($(Z),.bz2)
else ifeq ($(Z),.gz)
+else ifeq ($(Z),.lz)
else
$(warning "Z": "$(Z)")
-$(error Valid values for "Z": ["", ".bz2", ".gz"])
+$(error Valid values for "Z": ["", ".bz2", ".gz", ".lz"])
endif
@@ -183,6 +184,11 @@ else ifeq ($(Z),.gz)
$(GZIP) - <$@ \
| $(SPONGE) $@; \
fi
+else ifeq ($(Z),.lz)
+ if ! $(TEST) -L $@; then \
+ $(LZIP) - <$@ \
+ | $(SPONGE) $@; \
+ fi
endif
$(_mandirs): %/: | $$(dir %) $(_mandir)/