From: Alejandro Colomar Date: Wed, 12 Apr 2023 12:43:00 +0000 (+0200) Subject: *.mk: $Z: Support installing lzip(1) compressed pages X-Git-Tag: man-pages-6.05~189 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=b220bc5b0bcc73904715f387bca67d3ca7dd6e56;p=thirdparty%2Fman-pages.git *.mk: $Z: Support installing lzip(1) compressed pages Suggested-by: Ralph Corderoy Signed-off-by: Alejandro Colomar --- diff --git a/Makefile b/Makefile index 6931d7bce7..09a1deef69 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 d25062176f..4e56bdb41f 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)/