1POFILES = ja.po ru.po 2 3DOMAIN = alsaconf 4GETTEXT_SRC = ../alsaconf.in 5 6XGETTEXT_OPTIONS = -kxmsg -kxecho 7 8top_builddir = ../.. 9 10srcdir = @srcdir@ 11datadir = @datadir@ 12exec_prefix = @exec_prefix@ 13prefix = @prefix@ 14localedir = $(datadir)/locale 15 16USE_NLS = @USE_NLS@ 17INSTALL = @INSTALL@ 18INSTALL_DATA = @INSTALL_DATA@ 19# mkdir_p = @mkdir_p@ 20mkdir_p = mkdir -p -- 21XGETTEXT = @XGETTEXT@ 22MSGFMT = @MSGFMT@ 23GMSGFMT = @GMSGFMT@ 24MSGMERGE = @MSGMERGE@ 25MSGMERGE_UPDATE = @MSGMERGE@ --update 26 27DISTFILES = $(POFILES) Makefile.in 28CATALOGS = $(POFILES:.po=.gmo) 29 30all: all-@USE_NLS@ 31 32all-yes: $(CATALOGS) 33all-no: 34 35.SUFFIXES: .po .gmo .mo 36 37%.mo : $(srcdir)/%.po 38 $(MSGFMT) -c -o t-$@ $< && mv t-$@ $@ 39 40%.gmo : $(srcdir)/%.po 41 @lang=`echo $(srcdir)/$* | sed -e 's,.*/,,'`; \ 42 rm -f $${lang}.gmo && $(GMSGFMT) -c --statistics -o t-$${lang}.gmo $(srcdir)/$${lang}.po && mv t-$${lang}.gmo $${lang}.gmo 43 44$(DOMAIN).pot: $(GETTEXT_SRC) 45 $(XGETTEXT) -o$@ --default-domain=$(DOMAIN) \ 46 --add-comments=TRANSLATORS: --language=Shell \ 47 $(XGETTEXT_OPTIONS) $< 48 49check check_recursive: 50 51clean: 52 rm -f $(CATALOGS) $(POFILES:.po=.mo) $(DOMAIN).pot 53 54update-po: $(DOMAIN).pot 55 @for po in $(POFILES); do \ 56 $(MSGMERGE_UPDATE) $(srcdir)/$$po $(DOMAIN).pot; \ 57 done 58 59install-data-no: 60install-data-yes: all 61 $(mkdir_p) $(DESTDIR)$(datadir) 62 @catalogs='$(CATALOGS)'; \ 63 for cat in $$catalogs; do \ 64 lang=`echo $$cat | sed -e 's/\.gmo$$//'`; \ 65 dir=$(localedir)/$$lang/LC_MESSAGES; \ 66 $(mkdir_p) $(DESTDIR)$$dir; \ 67 $(INSTALL_DATA) $$cat $(DESTDIR)$$dir/$(DOMAIN).mo; \ 68 done 69 70install-data: install-data-@USE_NLS@ 71install: install-data 72 73uninstall-data-no: 74uninstall-data-yes: 75 @catalogs='$(CATALOGS)'; \ 76 for cat in $$catalogs; do \ 77 cat=`basename $$cat`; \ 78 lang=`echo $$cat | sed -e 's/\.gmo$$//'`; \ 79 rm -f $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(DOMAIN).mo; \ 80 done 81 82uninstall-data: uninstall-data-@USE_NLS@ 83uninstall: uninstall-data 84 85dist distdir: $(DISTFILES) 86 @for file in $(DISTFILES); do \ 87 cp -p $$file $(distdir); \ 88 done 89 90distclean: clean 91 rm -f Makefile *~ 92