po: Update translations from translationproject.org.
[pspp.git] / po / automake.mk
blobb537af3e9c49a870c178343d80b0fde7d31016aa
1 include $(top_srcdir)/po/Makevars
3 XGETTEXT=xgettext
4 MSGMERGE=msgmerge
5 MSGFMT=msgfmt
7 POFILES = \
8 po/ca.po \
9 po/cs.po \
10 po/de.po \
11 po/en_GB.po \
12 po/es.po \
13 po/fr.po \
14 po/ja.po \
15 po/lt.po \
16 po/nl.po \
17 po/sl.po \
18 po/pt_BR.po \
19 po/uk.po
21 POTFILE=po/$(DOMAIN).pot
23 TRANSLATABLE_FILES = $(DIST_SOURCES) $(all_q_sources)
25 XGETTEXT_OPTIONS = \
26 --copyright-holder="$(COPYRIGHT_HOLDER)" \
27 --package-name=$(PACKAGE) \
28 --package-version=$(VERSION) \
29 --msgid-bugs-address=$(MSGID_BUGS_ADDRESS) \
30 --from-code=UTF-8 \
31 --add-comments='TRANSLATORS:'
33 $(POTFILE): $(TRANSLATABLE_FILES) $(UI_FILES) src/ui/gui/gen-dot-desktop.sh
34 @$(MKDIR_P) po
35 $(XGETTEXT) --directory=$(top_srcdir) $(XGETTEXT_OPTIONS) $(TRANSLATABLE_FILES) --language=C --keyword=_ --keyword=N_ -o $@
36 $(XGETTEXT) --directory=$(top_srcdir) $(XGETTEXT_OPTIONS) -j $(UI_FILES) --language=glade -o $@
37 $(XGETTEXT) --directory=$(top_srcdir) $(XGETTEXT_OPTIONS) -j src/ui/gui/gen-dot-desktop.sh --language=shell --keyword=TRANSLATE -o $@
40 $(POFILES): $(POTFILE)
41 $(MSGMERGE) $(top_srcdir)/$@ $? -o $@
42 if test -e $(top_srcdir)/$@,aux ; then \
43 touch $@ ; \
44 msgcat --use-first $(top_srcdir)/$@,aux $@ -o $@; \
45 fi ;
49 SUFFIXES += .po .gmo
50 .po.gmo:
51 @$(MKDIR_P) `dirname $@`
52 $(MSGFMT) $< -o $@
55 GMOFILES = $(POFILES:.po=.gmo)
57 ALL_LOCAL += $(GMOFILES)
59 install-data-hook: $(GMOFILES)
60 for f in $(GMOFILES); do \
61 lang=`echo $$f | sed -e 's%po/\(.*\)\.gmo%\1%' ` ; \
62 $(MKDIR_P) $(DESTDIR)$(prefix)/share/locale/$$lang/LC_MESSAGES; \
63 $(INSTALL_DATA) $$f $(DESTDIR)$(prefix)/share/locale/$$lang/LC_MESSAGES/$(DOMAIN).mo ; \
64 done
66 uninstall-hook:
67 for f in $(GMOFILES); do \
68 lang=`echo $$f | sed -e 's%po/\(.*\)\.gmo%\1%' ` ; \
69 rm -f $(DESTDIR)$(prefix)/share/locale/$$lang/LC_MESSAGES/$(DOMAIN).mo ; \
70 done
73 EXTRA_DIST += \
74 $(POFILES) \
75 $(POTFILE) \
76 po/ChangeLog \
77 po/cs.po,aux \
78 po/de.po,aux
80 CLEANFILES += $(GMOFILES) $(POTFILE)
82 # Clean $(POFILES) from build directory but not if that's the same as
83 # the source directory.
84 po_CLEAN:
85 @if test "$(srcdir)" != .; then \
86 echo rm -f $(POFILES); \
87 rm -f $(POFILES); \
89 CLEAN_LOCAL += po_CLEAN