Add documentation for SPV file format.
[pspp.git] / po / automake.mk
blob2936a9a83f78bdbdfcdcf69ee82d0894be982bc9
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/gl.po \
15 po/ja.po \
16 po/lt.po \
17 po/nl.po \
18 po/pl.po \
19 po/pt_BR.po \
20 po/ru.po \
21 po/sl.po \
22 po/tr.po \
23 po/uk.po \
24 po/zh_CN.po
26 POTFILE=po/$(DOMAIN).pot
28 TRANSLATABLE_FILES = $(DIST_SOURCES) $(all_q_sources)
30 XGETTEXT_OPTIONS = \
31 --copyright-holder="$(COPYRIGHT_HOLDER)" \
32 --package-name=$(PACKAGE) \
33 --package-version=$(VERSION) \
34 --msgid-bugs-address=$(MSGID_BUGS_ADDRESS) \
35 --from-code=UTF-8 \
36 --add-comments='TRANSLATORS:'
38 $(POTFILE): $(TRANSLATABLE_FILES) $(UI_FILES) src/ui/gui/gen-dot-desktop.sh
39 @$(MKDIR_P) po
40 $(AM_V_GEN)$(XGETTEXT) --directory=$(top_srcdir) $(XGETTEXT_OPTIONS) $(TRANSLATABLE_FILES) --language=C --keyword=_ --keyword=N_ -o $@,tmp
41 $(AM_V_at)$(XGETTEXT) --directory=$(top_srcdir) $(XGETTEXT_OPTIONS) -j $(UI_FILES) --language=glade -o $@,tmp
42 $(AM_V_at)$(XGETTEXT) --directory=$(top_srcdir) $(XGETTEXT_OPTIONS) -j src/ui/gui/gen-dot-desktop.sh --language=shell --keyword=TRANSLATE -o $@,tmp
43 $(AM_V_at)$(SED) -e '/^"POT-Creation-Date: .*/d' $@,tmp > $@
45 $(POFILES): $(POTFILE)
46 $(AM_V_GEN)$(MSGMERGE) --quiet $(top_srcdir)/$@ $? -o $@,tmp
47 $(AM_V_at)if test -e $(top_srcdir)/$@,aux ; then \
48 touch $@,tmp ; \
49 msgcat --use-first $(top_srcdir)/$@,aux $@,tmp -o $@,tmp; \
50 fi ;
51 $(AM_V_at)$(SED) -e '/^"POT-Creation-Date: /d' $@,tmp > $@
53 SUFFIXES += .po .gmo
54 .po.gmo:
55 @$(MKDIR_P) `dirname $@`
56 $(AM_V_GEN)$(MSGFMT) $< -o $@
59 GMOFILES = $(POFILES:.po=.gmo)
61 ALL_LOCAL += $(GMOFILES)
63 install-data-hook: $(GMOFILES)
64 for f in $(GMOFILES); do \
65 lang=`echo $$f | $(SED) -e 's%po/\(.*\)\.gmo%\1%' ` ; \
66 $(MKDIR_P) $(DESTDIR)$(prefix)/share/locale/$$lang/LC_MESSAGES; \
67 $(INSTALL_DATA) $$f $(DESTDIR)$(prefix)/share/locale/$$lang/LC_MESSAGES/$(DOMAIN).mo ; \
68 done
70 uninstall-hook:
71 for f in $(GMOFILES); do \
72 lang=`echo $$f | $(SED) -e 's%po/\(.*\)\.gmo%\1%' ` ; \
73 rm -f $(DESTDIR)$(prefix)/share/locale/$$lang/LC_MESSAGES/$(DOMAIN).mo ; \
74 done
77 EXTRA_DIST += \
78 $(POFILES) \
79 $(POTFILE) \
80 po/ChangeLog \
81 po/cs.po,aux
83 CLEANFILES += $(GMOFILES) $(POTFILE)
85 # Clean $(POFILES) from build directory but not if that's the same as
86 # the source directory.
87 po_CLEAN:
88 @if test "$(srcdir)" != .; then \
89 echo rm -f $(POFILES); \
90 rm -f $(POFILES); \
92 CLEAN_LOCAL += po_CLEAN