From 4b1447809ffbc0d77c0ad456bd6b3afcf0b8623e Mon Sep 17 00:00:00 2001 From: Lasse Collin Date: Fri, 7 Feb 2020 15:32:21 +0200 Subject: Build: Add support for translated man pages using po4a. The dependency on po4a is optional. It's never required to install the translated man pages when xz is built from a release tarball. If po4a is missing when building from xz.git, the translated man pages won't be generated but otherwise the build will work normally. The translations are only updated automatically by autogen.sh and by "make mydist". This makes it easy to keep po4a as an optional dependency and ensures that I won't forget to put updated translations to a release tarball. The translated man pages aren't installed if --disable-nls is used. The installation of translated man pages abuses Automake internals by calling "install-man" with redefined dist_man_MANS and man_MANS. This makes the hairy script code slightly less hairy. If it breaks some day, this code needs to be fixed; don't blame Automake developers. Also, this adds more quotes to the existing shell script code in the Makefile.am "-hook"s. --- Makefile.am | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'Makefile.am') diff --git a/Makefile.am b/Makefile.am index 16db5142..3a634991 100644 --- a/Makefile.am +++ b/Makefile.am @@ -47,6 +47,7 @@ dist_examplesold_DATA = \ endif EXTRA_DIST = \ + po4a \ extra \ dos \ windows \ @@ -99,8 +100,11 @@ dist-hook: fi # This works with GNU tar and gives cleaner package than normal 'make dist'. +# This also ensures that the man page translations are up to date (dist-hook +# would be too late for that). mydist: sh "$(srcdir)/src/liblzma/validate_map.sh" + cd "$(srcdir)/po4a" && sh update-po VERSION=$(VERSION); \ if test -d "$(srcdir)/.git" && type git > /dev/null 2>&1; then \ SNAPSHOT=`cd "$(srcdir)" && git describe --abbrev=4 | cut -b2-`; \ -- cgit v1.2.3