created script to check the list of source files to handle for translation
[wmaker-crm.git] / WINGs / po / Makefile.am
blob8b4867fcb459a957a341c3f9d6855c976e5f8bef
1 nlsdir      = $(NLSDIR)
3 CATALOGS = @WINGSMOFILES@
5 CLEANFILES = $(CATALOGS) WINGs.pot
7 EXTRA_DIST = bg.po ca.po cs.po de.po fr.po hu.po nl.po sk.po
9 POTFILES  = \
10         $(top_srcdir)/WINGs/error.c \
11         $(top_srcdir)/WINGs/findfile.c \
12         $(top_srcdir)/WINGs/proplist.c \
13         $(top_srcdir)/WINGs/userdefaults.c \
14         $(top_srcdir)/WINGs/wcolor.c \
15         $(top_srcdir)/WINGs/wcolorpanel.c \
16         $(top_srcdir)/WINGs/wfilepanel.c \
17         $(top_srcdir)/WINGs/wfont.c \
18         $(top_srcdir)/WINGs/wfontpanel.c \
19         $(top_srcdir)/WINGs/widgets.c \
20         $(top_srcdir)/WINGs/wruler.c
22 SUFFIXES = .po .mo
24 .po.mo: 
25         msgfmt -c -o $@ $<
28 all-local: $(CATALOGS)
30 WINGs.pot: $(POTFILES)
31         xgettext --default-domain=WINGs \
32         --add-comments --keyword=_ --keyword=N_ $(POTFILES)
33         if cmp -s WINGs.po WINGs.pot; then \
34             rm -f WINGs.po; \
35         else \
36             mv -f WINGs.po WINGs.pot; \
37         fi
39 install-data-local:  $(CATALOGS)
40         $(mkinstalldirs) $(DESTDIR)$(nlsdir)
41         chmod 755 $(DESTDIR)$(nlsdir) 
42         for n in $(CATALOGS) __DuMmY ; do \
43                 if test "$$n" -a "$$n" != "__DuMmY" ; then \
44                         l=`basename $$n .mo`; \
45                         $(mkinstalldirs) $(DESTDIR)$(nlsdir)/$$l/LC_MESSAGES; \
46                         chmod 755 $(DESTDIR)$(nlsdir)/$$l; \
47                         chmod 755 $(DESTDIR)$(nlsdir)/$$l/LC_MESSAGES; \
48                         $(INSTALL_DATA) -m 644 $$n $(DESTDIR)$(nlsdir)/$$l/LC_MESSAGES/WINGs.mo; \
49                 fi; \
50         done
52 # Create a 'silent rule' for our make check the same way automake does
53 AM_V_CHKTRANS = $(am__v_CHKTRANS_$(V))
54 am__v_CHKTRANS_ = $(am__v_CHKTRANS_$(AM_DEFAULT_VERBOSITY))
55 am__v_CHKTRANS_0 = @echo "  CHK     translations" ;
56 am__v_CHKTRANS_1 =
58 # 'make check' will make sure the tranlation sources are in line with the compiled source
59 check-local:
60         $(AM_V_CHKTRANS)$(top_srcdir)/script/check-translation-sources.sh \
61                 "$(srcdir)" -s "$(top_srcdir)/WINGs/Makefile.am"