1 include $(top_srcdir)/po/Makevars
19 POTFILE=po/$(DOMAIN).pot
21 TRANSLATABLE_FILES = $(DIST_SOURCES) $(all_q_sources)
24 --copyright-holder="$(COPYRIGHT_HOLDER)" \
25 --package-name=$(PACKAGE) \
26 --package-version=$(VERSION) \
27 --msgid-bugs-address=$(MSGID_BUGS_ADDRESS) \
29 --add-comments='TRANSLATORS:'
31 $(POTFILE): $(TRANSLATABLE_FILES) $(UI_FILES) src/ui/gui/gen-dot-desktop.sh
33 $(XGETTEXT) --directory=$(top_srcdir) $(XGETTEXT_OPTIONS) $(TRANSLATABLE_FILES) --language=C --keyword=_ --keyword=N_ -o $@
34 $(XGETTEXT) --directory=$(top_srcdir) $(XGETTEXT_OPTIONS) -j $(UI_FILES) --language=glade -o $@
35 $(XGETTEXT) --directory=$(top_srcdir) $(XGETTEXT_OPTIONS) -j src/ui/gui/gen-dot-desktop.sh --language=shell --keyword=TRANSLATE -o $@
38 $(POFILES): $(POTFILE)
39 $(MSGMERGE) $(top_srcdir)/$@ $? -o $@
40 if test -e $(top_srcdir)/$@,aux ; then \
42 msgcat --use-first $(top_srcdir)/$@,aux $@ -o $@; \
49 @$(MKDIR_P) `dirname $@`
53 GMOFILES = $(POFILES:.po=.gmo)
55 ALL_LOCAL += $(GMOFILES)
57 install-data-hook: $(GMOFILES)
58 for f in $(GMOFILES); do \
59 lang=`echo $$f | sed -e 's%po/\(.*\)\.gmo%\1%' ` ; \
60 $(MKDIR_P) $(DESTDIR)$(prefix)/share/locale/$$lang/LC_MESSAGES; \
61 $(INSTALL_DATA) $$f $(DESTDIR)$(prefix)/share/locale/$$lang/LC_MESSAGES/$(DOMAIN).mo ; \
65 for f in $(GMOFILES); do \
66 lang=`echo $$f | sed -e 's%po/\(.*\)\.gmo%\1%' ` ; \
67 rm -f $(DESTDIR)$(prefix)/share/locale/$$lang/LC_MESSAGES/$(DOMAIN).mo ; \
71 EXTRA_DIST += $(POFILES) $(POTFILE)
73 CLEANFILES += $(GMOFILES) $(POTFILE)
75 # Clean $(POFILES) from build directory but not if that's the same as
76 # the source directory.
78 @if test "$(srcdir)" != .; then \
79 echo rm -f $(POFILES); \
82 CLEAN_LOCAL += po_CLEAN