LANGUAGES=sk LANG_FILES=$(addsuffix .mo,$(LANGUAGES)) LOCALE_DIR=$(DESTDIR)$(PREFIX)/share/locale POFILES=../avlib.py ../srv/webq.py ../srv/web/*.html PYGETTEXT=/usr/bin/pygettext.py .PHONY: all install update all: $(LANG_FILES) sagator.pot: $(POFILES) [ "$(PYGETTEXT)" ] && python $(PYGETTEXT) -o $@ $(POFILES) || true update: sagator.pot %.po: msgmerge --update $@ sagator.pot touch $@ %.mo: %.po msgfmt -o $@ $< install: all for lang in $(LANGUAGES); do \ mkdir -p $(LOCALE_DIR)/$$lang/LC_MESSAGES; \ cp -pf $$lang.mo $(LOCALE_DIR)/$$lang/LC_MESSAGES/$(PROGNAME).mo \ || echo "WARNING: Compiled locale files (.mo) not found!"; \ done clean: rm -f *~ *.mo