X-Git-Url: http://git.chise.org/gitweb/?a=blobdiff_plain;f=etc%2Fpo%2FMakefile.am;fp=etc%2Fpo%2FMakefile.am;h=aec85c81c29819a17e1ec17df9c5a3a5c178d8e7;hb=5e5df00c11582a49b64715ea5b0c0e94a3a8c0a2;hp=3077b4c3539400c5341fa91e0db2294e18636f6a;hpb=0de820f607a4667eabce9d192649330e94ab4ff8;p=elisp%2Fliece.git diff --git a/etc/po/Makefile.am b/etc/po/Makefile.am index 3077b4c..aec85c8 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=`basename $$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