wmgenmenu: Add French and Spanish translations
[wmaker-crm.git] / util / po / Makefile.am
1 CATALOGS = @UTILMOFILES@
2
3 nlsdir = $(NLSDIR)
4
5 CLEANFILES = wmgenmenu.pot $(CATALOGS)
6
7 EXTRA_DIST = de.po es.po fr.po
8
9 POTFILES  = \
10         $(top_srcdir)/util/wmgenmenu.c \
11         $(top_srcdir)/util/wmgenmenu.h
12
13 SUFFIXES = .po .mo
14
15 .po.mo:
16         msgfmt -c -o $@ $<
17
18
19 all-local: $(CATALOGS)
20
21 wmgenmenu.pot: $(POTFILES)
22         xgettext --default-domain=wmgenmenu \
23         --add-comments --keyword=_ --keyword=N_ $(POTFILES)
24         if cmp -s wmgenmenu.po wmgenmenu.pot; then \
25             rm -f wmgenmenu.po; \
26         else \
27             mv -f wmgenmenu.po wmgenmenu.pot; \
28         fi
29
30
31 install-data-local:  $(CATALOGS)
32         $(mkinstalldirs) $(DESTDIR)$(nlsdir)
33         chmod 755 $(DESTDIR)$(nlsdir)
34         for n in $(CATALOGS) __DuMmY ; do \
35                 if test "$$n" -a "$$n" != "__DuMmY" ; then \
36                         l=`basename $$n .mo`; \
37                         $(mkinstalldirs) $(DESTDIR)$(nlsdir)/$$l/LC_MESSAGES; \
38                         chmod 755 $(DESTDIR)$(nlsdir)/$$l; \
39                         chmod 755 $(DESTDIR)$(nlsdir)/$$l/LC_MESSAGES; \
40                         $(INSTALL_DATA) -m 644 $$n $(DESTDIR)$(nlsdir)/$$l/LC_MESSAGES/wmgenmenu.mo; \
41                 fi; \
42         done