]> git.ipfire.org Git - thirdparty/man-pages.git/commitdiff
*.mk: $Z: Support installing lzip(1) compressed pages
authorAlejandro Colomar <alx@kernel.org>
Wed, 12 Apr 2023 12:43:00 +0000 (14:43 +0200)
committerAlejandro Colomar <alx@kernel.org>
Wed, 12 Apr 2023 12:52:42 +0000 (14:52 +0200)
Suggested-by: Ralph Corderoy <ralph@inputplus.co.uk>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
Makefile
lib/install-man.mk

index 6931d7bce7257c0c85d4b22b7aaf7d51729ad200..09a1deef69defebc7bd41819cd80256a436efcd3 100644 (file)
--- 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-//)
index d25062176fb8bd559f180f74d93cb790d7c1cb73..4e56bdb41fdbfbebaddcfde087f522e536a7ee80 100644 (file)
@@ -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)/