NAME = qarepo localedir = ${prefix}/share/locale PL_FILE = ../$(NAME) DT_FILE = ../$(NAME).desktop.in POFILES = $(wildcard *.po) MOFILES = $(POFILES:%.po=%.mo) LANGS = $(POFILES:%.po=%) all: $(NAME).pot $(POFILES) $(MOFILES) %.mo: %.po msgfmt -o $@ $< update: $(NAME).pot $(NAME).pot: $(PL_FILE) $(DT_FILE) xgettext --language=perl --keyword=__ --output tmp1.pot $(PL_FILE) intltool-update --pot --gettext-package tmp2 msgcat --use-first tmp1.pot tmp2.pot > $@ @rm -r tmp*.pot install: all for l in $(LANGS); do \ install -d $(localedir)/$$l/LC_MESSAGES; \ install -m 644 $$l.mo $(localedir)/$$l/LC_MESSAGES/$(NAME).mo; \ done clean: @rm -rf *.mo $(POFILES:%=%t)