From 0621e91a8c975e34f2c2092ad3013d6ff81b5ac2 Mon Sep 17 00:00:00 2001 From: Dylan Baker Date: Fri, 24 Aug 2018 06:49:55 -0700 Subject: util/xmlpool: Update for meson generation Meson won't put the .gmo files in the layout that python's gettext.translation() expects, it puts them in the build directory in a flat layout. This modifies android and autotools to do the same (scons doesn't work with translations at all) v3: - Squash 4 patches into this patch Reviewed-by: Emil Velikov --- src/util/xmlpool/Makefile.am | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'src/util/xmlpool/Makefile.am') diff --git a/src/util/xmlpool/Makefile.am b/src/util/xmlpool/Makefile.am index 1c14311dcf5..f993070ef67 100644 --- a/src/util/xmlpool/Makefile.am +++ b/src/util/xmlpool/Makefile.am @@ -47,10 +47,10 @@ POS=ca.po de.po es.po nl.po fr.po sv.po # Don't change anything below, unless you know what you're doing. # LANGS=$(POS:%.po=%) -MOS=$(POS:%.po=%/LC_MESSAGES/options.mo) +MOS=$(POS:%.po=%.gmo) POT=xmlpool.pot -.PHONY: all clean pot po mo +.PHONY: all clean clean-local pot po mo EXTRA_DIST = \ gen_xmlpool.py \ @@ -69,17 +69,19 @@ CLEANFILES = \ $(POS) \ $(MOS) +clean-local: + rm -f $(MOS) + # Default target options.h LOCALEDIR := . options.h: t_options.h $(MOS) $(AM_V_GEN) $(PYTHON) $(PYTHON_FLAGS) $(srcdir)/gen_xmlpool.py $(srcdir)/t_options.h $(LOCALEDIR) $(LANGS) > options.h # Update .mo files from the corresponding .po files. -%/LC_MESSAGES/options.mo: %.po +%.gmo: %.po @mo="$@"; \ lang=$${mo%%/*}; \ echo "Updating ($$lang) $@ from $?."; \ - $(MKDIR_P) $$lang/LC_MESSAGES; \ msgfmt -o $@ $? # Use this target to create or update .po files with new messages in -- cgit v1.2.3