aboutsummaryrefslogtreecommitdiff
path: root/po/Makefile.am
blob: e32341ef7ea61abbab676a48c32b0b110b94d3f2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
languages := @ALL_LINGUAS@

CLEANFILES 				= $(foreach mo,$(languages),$(mo).mo)
EXTRA_DIST 				= $(foreach po,$(languages),$(po).po) POTFILES.in README

MAINTAINERCLEANFILES 			= Makefile.in POTFILES

MO_FILE                                 = $(PACKAGE)-libs

%.mo: %.po
	msgfmt --statistics -v -o$(top_builddir)/po/$@ $(srcdir)/$<

all: $(foreach mo,$(languages),$(mo).mo)

merge:
	for mo in $(languages); do \
		echo "Merging $$mo..."; \
		msgmerge -v $$mo.po hildon-libs.pot >messages.tmp; \
		mv messages.tmp $$mo.po; \
		msgfmt --statistics $$mo.po -o /dev/null; \
	done

install-data-local: all
	for mo in $(languages); do \
		$(mkinstalldirs) $(DESTDIR)$(localedir)/$$mo/LC_MESSAGES; \
		$(INSTALL_DATA) $(top_builddir)/po/$$mo.mo $(DESTDIR)$(localedir)/$$mo/LC_MESSAGES/$(MO_FILE).mo; \
	done

uninstall-local:
	for mo in $(languages); do \
		rm -f $(DESTDIR)$(localedir)/$$mo/LC_MESSAGES/$(MO_FILE).mo; \
	done