* etc/po/Makefile.am: Install *.mo files as well.
authorueno <ueno>
Thu, 21 Mar 2002 02:04:39 +0000 (02:04 +0000)
committerueno <ueno>
Thu, 21 Mar 2002 02:04:39 +0000 (02:04 +0000)
(install-data-local): New target.
* etc/sample.dot.emacs.in: Rename po -> locale.
* lisp/liece-intl.el: Likewise.

etc/po/Makefile.am
etc/sample.dot.emacs.in
lisp/liece-intl.el

index 3077b4c..b165aed 100644 (file)
@@ -1,3 +1,26 @@
-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
index 817453d..bb3872e 100644 (file)
@@ -1,5 +1,5 @@
 ;;; -*- 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")
index 78b9f66..7330650 100644 (file)
@@ -66,7 +66,7 @@
 (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)