wmgenmenu: A Window Maker menu generator
[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
8
9 POTFILES  = \
10         $(top_builddir)/util/wmgenmenu.c
11
12 SUFFIXES = .po .mo
13
14 .po.mo:
15         msgfmt -c -o $@ $<
16
17
18 all-local: $(CATALOGS)
19
20 wmgenmenu.pot: $(POTFILES)
21         xgettext --default-domain=wmgenmenu \
22         --add-comments --keyword=_ --keyword=N_ $(POTFILES)
23         if cmp -s wmgenmenu.po wmgenmenu.pot; then \
24             rm -f wmgenmenu.po; \
25         else \
26             mv -f wmgenmenu.po wmgenmenu.pot; \
27         fi
28
29
30 install-data-local:  $(CATALOGS)
31         $(mkinstalldirs) $(DESTDIR)$(nlsdir)
32         chmod 755 $(DESTDIR)$(nlsdir)
33         for n in $(CATALOGS) __DuMmY ; do \
34                 if test "$$n" -a "$$n" != "__DuMmY" ; then \
35                         l=`basename $$n .mo`; \
36                         $(mkinstalldirs) $(DESTDIR)$(nlsdir)/$$l/LC_MESSAGES; \
37                         chmod 755 $(DESTDIR)$(nlsdir)/$$l; \
38                         chmod 755 $(DESTDIR)$(nlsdir)/$$l/LC_MESSAGES; \
39                         $(INSTALL_DATA) -m 644 $$n $(DESTDIR)$(nlsdir)/$$l/LC_MESSAGES/wmgenmenu.mo; \
40                 fi; \
41         done