-podir = $(pkgdatadir)/po
-po_DATA = $(wildcard *.po)
-EXTRA_DIST = $(po_DATA)
\ No newline at end of file
+localedir = $(pkgdatadir)/locale
+
+pofiles = $(wildcard *.po)
+mofiles = $(pofiles:%.po=%.mo)
+
+EXTRA_DIST = $(pofiles)
+
+all: $(mofiles)
+%.mo: %.po
+ msgfmt -o $@ $<
+
+install-data-local: $(mofiles)
+ @$(NORMAL_INSTALL)
+ $(mkinstalldirs) $(DESTDIR)$(localedir)
+ @list='$(mofiles)'; for p in $$list; do \
+ lang=`echo $$p | sed s/\.mo//`; \
+ $(mkinstalldirs) $(DESTDIR)$(localedir)/$$lang; \
+ $(mkinstalldirs) $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES; \
+ if test -f $(srcdir)/$$p; then \
+ echo " $(INSTALL_DATA) $(srcdir)/$$p $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/liece.mo"; \
+ $(INSTALL_DATA) $(srcdir)/$$p $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/liece.mo; \
+ else if test -f $$p; then \
+ echo " $(INSTALL_DATA) $$p $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/liece.mo"; \
+ $(INSTALL_DATA) $$p $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/liece.mo; \
+ fi; fi; \
+ done
;;; -*- emacs-lisp -*-
-(setq liece-intl-catalogue-directory "@pkgdatadir@/po"
+(setq liece-intl-catalogue-directory "@pkgdatadir@/locale"
liece-window-style-directory "@pkgdatadir@/styles"
liece-icon-directory "@pkgdatadir@/icons")
(defun liece-intl-load-catalogue ()
(if (null liece-intl-catalogue-directory)
(setq liece-intl-catalogue-directory
- (liece-locate-path "po")))
+ (liece-locate-path "locale")))
(bind-text-domain liece-intl-domain liece-intl-catalogue-directory))
(provide 'liece-intl)