1 include $(top_srcdir)/po/Makevars
7 POFILES=po/ca.po po/en_GB.po po/es.po po/lt.po po/nl.po po/pt_BR.po
9 POTFILE=po/$(DOMAIN).pot
11 TRANSLATABLE_FILES = $(DIST_SOURCES) $(all_q_sources)
14 --copyright-holder="$(COPYRIGHT_HOLDER)" \
15 --package-name=$(PACKAGE) \
16 --package-version=$(VERSION) \
17 --msgid-bugs-address=$(MSGID_BUGS_ADDRESS) \
19 --add-comments='TRANSLATORS:'
21 $(POTFILE): $(TRANSLATABLE_FILES) $(UI_FILES)
23 $(XGETTEXT) --directory=$(top_srcdir) $(XGETTEXT_OPTIONS) $(TRANSLATABLE_FILES) --language=C --keyword=_ --keyword=N_ -o $@
24 $(XGETTEXT) --directory=$(top_srcdir) $(XGETTEXT_OPTIONS) -j $(UI_FILES) --language=glade -o $@
27 $(POFILES): $(POTFILE)
28 $(MSGMERGE) $(top_srcdir)/$@ $? -o $@
33 @$(MKDIR_P) `dirname $@`
37 GMOFILES = $(POFILES:.po=.gmo)
39 ALL_LOCAL += $(GMOFILES)
41 install-data-hook: $(GMOFILES)
42 for f in $(GMOFILES); do \
43 lang=`echo $$f | sed -e 's%po/\(.*\)\.gmo%\1%' ` ; \
44 $(MKDIR_P) $(DESTDIR)$(prefix)/share/locale/$$lang/LC_MESSAGES; \
45 $(INSTALL_DATA) $$f $(DESTDIR)$(prefix)/share/locale/$$lang/LC_MESSAGES/$(DOMAIN).mo ; \
49 for f in $(GMOFILES); do \
50 lang=`echo $$f | sed -e 's%po/\(.*\)\.gmo%\1%' ` ; \
51 rm -f $(DESTDIR)$(prefix)/share/locale/$$lang/LC_MESSAGES/$(DOMAIN).mo ; \
55 EXTRA_DIST += $(POFILES) $(POTFILE)
57 CLEANFILES += $(GMOFILES) $(POTFILE)
59 # Clean $(POFILES) from build directory but not if that's the same as
60 # the source directory.
62 @if test "$(srcdir)" != .; then \
63 echo rm -f $(POFILES); \
66 CLEAN_LOCAL += po_CLEAN