diff options
author | Lasse Collin <lasse.collin@tukaani.org> | 2024-02-17 16:23:14 +0200 |
---|---|---|
committer | Lasse Collin <lasse.collin@tukaani.org> | 2024-02-17 16:23:14 +0200 |
commit | 56246607dff177b0410d140fcca4a42c865723dc (patch) | |
tree | 6b4b4be003576ec3ea2b80daebbc5ec8b48cf827 /src/lzmainfo | |
parent | liblzma: Avoid implementation-defined behavior in the RISC-V filter. (diff) | |
download | xz-56246607dff177b0410d140fcca4a42c865723dc.tar.xz |
Build: Install translated lzmainfo man pages.
All other translated man pages were being installed but
lzmainfo had been forgotten.
Diffstat (limited to 'src/lzmainfo')
-rw-r--r-- | src/lzmainfo/Makefile.am | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/src/lzmainfo/Makefile.am b/src/lzmainfo/Makefile.am index 4dc9a91c..9a5bc68b 100644 --- a/src/lzmainfo/Makefile.am +++ b/src/lzmainfo/Makefile.am @@ -33,3 +33,29 @@ dist_man_MANS = lzmainfo.1 .rc.o: $(RC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(lzmainfo_CPPFLAGS) $(CPPFLAGS) $(RCFLAGS) -i $< -o $@ + +# The installation of translated man pages abuses Automake internals +# by calling "install-man" with redefined dist_man_MANS and man_MANS. +# If this breaks some day, don't blame Automake developers. +install-data-hook: + languages= ; \ + if test "$(USE_NLS)" = yes && test -d "$(top_srcdir)/po4a/man"; then \ + languages=`ls "$(top_srcdir)/po4a/man"`; \ + fi; \ + for lang in . $$languages; do \ + man="$(top_srcdir)/po4a/man/$$lang/lzmainfo.1" ; \ + if test -f "$$man"; then \ + $(MAKE) dist_man_MANS="$$man" man_MANS= \ + mandir="$(mandir)/$$lang" install-man; \ + fi; \ + done + +uninstall-hook: + languages= ; \ + if test "$(USE_NLS)" = yes && test -d "$(top_srcdir)/po4a/man"; then \ + languages=`ls "$(top_srcdir)/po4a/man"`; \ + fi; \ + for lang in . $$languages; do \ + name=`echo lzmainfo | sed '$(transform)'` && \ + rm -f "$(DESTDIR)$(mandir)/$$lang/man1/$$name.1"; \ + done |