summaryrefslogtreecommitdiffstats
path: root/src/util/xmlpool/Makefile.am
diff options
context:
space:
mode:
authorDylan Baker <[email protected]>2018-08-24 06:49:55 -0700
committerDylan Baker <[email protected]>2018-10-31 16:37:12 -0700
commit0621e91a8c975e34f2c2092ad3013d6ff81b5ac2 (patch)
tree9669c64bb512a57bf74ad583009d6b727121a401 /src/util/xmlpool/Makefile.am
parent7834926a4f5ca0a60ec3d18c87a1e0a68b615820 (diff)
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 <[email protected]>
Diffstat (limited to 'src/util/xmlpool/Makefile.am')
-rw-r--r--src/util/xmlpool/Makefile.am10
1 files changed, 6 insertions, 4 deletions
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