1 include $(top_srcdir)/po/Makevars
20 POTFILE=po/$(DOMAIN).pot
22 TRANSLATABLE_FILES = $(DIST_SOURCES) $(all_q_sources)
25 --copyright-holder="$(COPYRIGHT_HOLDER)" \
26 --package-name=$(PACKAGE) \
27 --package-version=$(VERSION) \
28 --msgid-bugs-address=$(MSGID_BUGS_ADDRESS) \
30 --add-comments='TRANSLATORS:'
32 $(POTFILE): $(TRANSLATABLE_FILES) $(UI_FILES) src/ui/gui/gen-dot-desktop.sh
34 $(XGETTEXT) --directory=$(top_srcdir) $(XGETTEXT_OPTIONS) $(TRANSLATABLE_FILES) --language=C --keyword=_ --keyword=N_ -o $@
35 $(XGETTEXT) --directory=$(top_srcdir) $(XGETTEXT_OPTIONS) -j $(UI_FILES) --language=glade -o $@
36 $(XGETTEXT) --directory=$(top_srcdir) $(XGETTEXT_OPTIONS) -j src/ui/gui/gen-dot-desktop.sh --language=shell --keyword=TRANSLATE -o $@
39 $(POFILES): $(POTFILE)
40 $(MSGMERGE) $(top_srcdir)/$@ $? -o $@
41 if test -e $(top_srcdir)/$@,aux ; then \
43 msgcat --use-first $(top_srcdir)/$@,aux $@ -o $@; \
50 @$(MKDIR_P) `dirname $@`
54 GMOFILES = $(POFILES:.po=.gmo)
56 ALL_LOCAL += $(GMOFILES)
58 install-data-hook: $(GMOFILES)
59 for f in $(GMOFILES); do \
60 lang=`echo $$f | sed -e 's%po/\(.*\)\.gmo%\1%' ` ; \
61 $(MKDIR_P) $(DESTDIR)$(prefix)/share/locale/$$lang/LC_MESSAGES; \
62 $(INSTALL_DATA) $$f $(DESTDIR)$(prefix)/share/locale/$$lang/LC_MESSAGES/$(DOMAIN).mo ; \
66 for f in $(GMOFILES); do \
67 lang=`echo $$f | sed -e 's%po/\(.*\)\.gmo%\1%' ` ; \
68 rm -f $(DESTDIR)$(prefix)/share/locale/$$lang/LC_MESSAGES/$(DOMAIN).mo ; \
72 EXTRA_DIST += $(POFILES) $(POTFILE)
74 CLEANFILES += $(GMOFILES) $(POTFILE)
76 # Clean $(POFILES) from build directory but not if that's the same as
77 # the source directory.
79 @if test "$(srcdir)" != .; then \
80 echo rm -f $(POFILES); \
83 CLEAN_LOCAL += po_CLEAN