The translation project coordinator Benno Schulenberg suggested that
we could save space in our tarball by trimming the generated po files
by using msgattrib and dropping all untranslated, fuzzy and obsolete
messages. This patch updates the update-translations target to do
that. Testing indicates that the current po files reduce by over 65K
lines due to this trimming.
The latest translations in the translationproject URL need to be
merged in using msgmerge for the po files to be correctly updated,
otherwise we may end up getting odd results, such as the previous
translations update. This patch adds another step to the
update-translations Makefile target which does a msgmerge of the
downloaded po file with libc.pot and then uses that as the final
result.
The update-translation target seems to have downloaded outdated
translations for these languages. Revert them and try to figure out
if this is a problem with the target or an error in translations.
Building and installing glibc leaves .mo files (compiled message
translations) behind in the source directory. Building those files in
the source directory may once have made sense, if they were included
in release tarballs; now that release tarballs are just the output of
"git archive", building any non-checked-in files in the source
directory does not make sense. This patch changes these files to be
built in the build directory instead. The realclean rule is changed
to simply adding the .mo files to the "generated" variable, since once
the files are in the build directory it make no sense to exclude them
from normal cleanup rules.
This is necessary but not sufficient to avoid build-many-glibcs.py
needing to copy the glibc source directory. Its list of files to
touch on checkout to avoid subsequent regeneration (configure,
preconfigure, *-kw.h) is incomplete (missing at least INSTALL,
sysdeps/gnu/errlist.c, posix/testcases.h, posix/ptestcases.h,
locale/C-translit.h, (only regenerated for Hurd builds)
sysdeps/mach/hurd/bits/errno.h, (only regenerated for 32-bit SPARC
builds) sysdeps/sparc/sparc32/{sdiv,udiv,rem,urem}.S) - the existing
list may be sufficient to prevent regeneration that actually changes
the file contents depending on the installed build tools, but not to
ensure there is no regeneration at all - and there might well be other
things writing into the source directory in the course of building and
testing (so needing appropriate testing with read-only source
directories with different timestamp orderings to find and eliminate
all such cases).
Tested for x86_64.
[BZ #14121]
* po/Makefile (generated): Add $(ALL_LINGUAS:%=%.mo).
(%.mo): Change to $(objpfx)%.mo. Use $(make-target-directory).
($(mo-installed)): Use $(objpfx)%.mo.
(realclean): Remove rule.
po/Makefile has both old code for copying .po files from a shared
directory /com/share/ftp/gnu/po/maint/glibc (presumably once present
on some GNU server), and new code for downloading them from the
Translation Project. This patch removes the old code, leading only
the new code.
Tested for x86_64.
* po/Makefile (linguas): Remove rule and dependencies.
(linguas.mo): Likewise.
(.PHONY): Do not depend on linguas and linguas.mo.
(podir): Remove variable.
(pofiles): Likewise.
[$(pofiles)] (%.po): Remove rule.
The PRIdLINENUM abstraction is unnecessary and breaks libc.pot
generation.
* timezone.zic (PRIdLINENO): Remove.
(verror): Use PRIdMAX.
* po/libc.pot: Regenerate.
Add a convenience target for maintainers to download and incorporate
translation updates from translations.org. Invoke as follows:
make -r PARALLELMFLAGS="" -C ../po objdir=`pwd` update-translations
similar to generating libc.pot.
* po/Makefile (update-translations): New target.