From: ueno Date: Thu, 21 Mar 2002 02:04:39 +0000 (+0000) Subject: * etc/po/Makefile.am: Install *.mo files as well. X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=8aae4cb5786a05b44a43db638bfb74659874719e;p=elisp%2Fliece.git * etc/po/Makefile.am: Install *.mo files as well. (install-data-local): New target. * etc/sample.dot.emacs.in: Rename po -> locale. * lisp/liece-intl.el: Likewise. --- diff --git a/etc/po/Makefile.am b/etc/po/Makefile.am index 3077b4c..b165aed 100644 --- a/etc/po/Makefile.am +++ b/etc/po/Makefile.am @@ -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 diff --git a/etc/sample.dot.emacs.in b/etc/sample.dot.emacs.in index 817453d..bb3872e 100644 --- a/etc/sample.dot.emacs.in +++ b/etc/sample.dot.emacs.in @@ -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") diff --git a/lisp/liece-intl.el b/lisp/liece-intl.el index 78b9f66..7330650 100644 --- a/lisp/liece-intl.el +++ b/lisp/liece-intl.el @@ -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)