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) \
18 --add-comments='TRANSLATORS:'
20 $(POTFILE): $(TRANSLATABLE_FILES) $(UI_FILES)
22 $(XGETTEXT) --directory=$(top_srcdir) $(XGETTEXT_OPTIONS) $(TRANSLATABLE_FILES) --language=C --keyword=_ --keyword=N_ -o $@
23 $(XGETTEXT) --directory=$(top_srcdir) $(XGETTEXT_OPTIONS) -j $(UI_FILES) --language=glade -o $@
26 $(POFILES): $(POTFILE)
27 $(MSGMERGE) $(top_srcdir)/$@ $? -o $@
32 @$(MKDIR_P) `dirname $@`
36 GMOFILES = $(POFILES:.po=.gmo)
38 ALL_LOCAL += $(GMOFILES)
40 install-data-hook: $(GMOFILES)
41 for f in $(GMOFILES); do \
42 lang=`echo $$f | sed -e 's%po/\(.*\)\.gmo%\1%' ` ; \
43 $(MKDIR_P) $(DESTDIR)$(prefix)/share/locale/$$lang/LC_MESSAGES; \
44 $(INSTALL_DATA) $$f $(DESTDIR)$(prefix)/share/locale/$$lang/LC_MESSAGES/$(DOMAIN).mo ; \
48 for f in $(GMOFILES); do \
49 lang=`echo $$f | sed -e 's%po/\(.*\)\.gmo%\1%' ` ; \
50 rm -f $(DESTDIR)$(prefix)/share/locale/$$lang/LC_MESSAGES/$(DOMAIN).mo ; \
54 EXTRA_DIST += $(POFILES) $(POTFILE)
56 CLEANFILES += $(GMOFILES) $(POTFILE)
58 # Clean $(POFILES) from build directory but not if that's the same as
59 # the source directory.
61 @if test "$(srcdir)" != .; then \
62 echo rm -f $(POFILES); \
65 CLEAN_LOCAL += po_CLEAN