1PREFIX=/usr/local 2LOCALE_DIR=$(PREFIX)/share/locale 3PACKAGE=batterycat 4 5LANGUAGES=de fr 6# add more languages here, such as: 7# LANGUAGES=de fr it 8# 9# be sure that the .po files are in UTF-8 encoding 10# 11 12all: 13 for i in $(LANGUAGES) ; do \ 14 msgfmt -o $$i.gmo $$i.po; \ 15 done 16 17install: 18 for i in $(LANGUAGES) ; do \ 19 mkdir -p $(LOCALE_DIR)/$$i/LC_MESSAGES; \ 20 install -c -m644 $$i.gmo $(LOCALE_DIR)/$$i/LC_MESSAGES/$(PACKAGE).mo; \ 21 done 22 23uninstall: 24 for i in $(LANGUAGES) ; do \ 25 rm -f $(LOCALE_DIR)/$$i/LC_MESSAGES/$(PACKAGE).mo; \ 26 done 27 28clean: 29 rm -f *~ *.gmo 30 31pot: 32 xgettext -f potfiles -d $(PACKAGE) -o $(PACKAGE).pot --keyword=_ 33