Fix order of pool_calloc arguments.
[pspp-builds.git] / po / automake.mk
1 include $(top_srcdir)/po/Makevars
2
3 XGETTEXT=xgettext
4 MSGMERGE=msgmerge
5 MSGFMT=msgfmt
6
7 POFILES=po/en_GB.po po/nl.po po/pt_BR.po
8
9 POTFILE=po/$(DOMAIN).pot
10
11 TRANSLATABLE_FILES = $(DIST_SOURCES) $(all_q_sources)
12
13 $(POTFILE): $(TRANSLATABLE_FILES)
14         @$(MKDIR_P) po
15         $(XGETTEXT) --directory=$(top_srcdir) $(TRANSLATABLE_FILES) \
16         $(XGETTEXT_OPTIONS) \
17         --copyright-holder="$(COPYRIGHT_HOLDER)" \
18         --package-name=$(PACKAGE) \
19         --package-version=$(VERSION) \
20         --msgid-bugs-address=$(MSGID_BUGS_ADDRESS) \
21         --add-comments='TRANSLATORS:' \
22         -o $(POTFILE)
23
24
25 $(POFILES): $(POTFILE)
26         $(MSGMERGE) $(top_srcdir)/$* $< -o $@
27
28 .po.gmo:
29         @$(MKDIR_P) `dirname $@`
30         $(MSGFMT) $< -o $@
31
32
33 GMOFILES = $(POFILES:.po=.gmo)
34
35 ALL_LOCAL += $(GMOFILES)
36
37 install-data-hook: $(GMOFILES)
38         for f in $(GMOFILES); do \
39           lang=`echo $$f | sed -e 's%po/\(.*\)\.gmo%\1%' ` ; \
40           $(INSTALL) -D $$f $(DESTDIR)$(prefix)/share/locale/$$lang/LC_MESSAGES/$(DOMAIN).mo ; \
41         done
42         
43
44 uninstall-hook:
45         for f in $(GMOFILES); do \
46           lang=`echo $$f | sed -e 's%po/\(.*\)\.gmo%\1%' ` ; \
47           $(RM) $(DESTDIR)$(prefix)/share/locale/$$lang/LC_MESSAGES/$(DOMAIN).mo ; \
48         done
49
50
51 EXTRA_DIST += $(POFILES) $(POTFILE)
52
53 CLEANFILES += $(POFILES) $(GMOFILES) $(POTFILE)
54