chirp/locale/Makefile

29 lines
766 B
Makefile
Raw Normal View History

LOCALES = en_US pl it nl de hu ru pt_BR
MOFILES = $(patsubst %,%/LC_MESSAGES/CHIRP.mo,$(LOCALES))
COPY="Dan Smith <dsmith@danplanet.com>"
PKG=CHIRP
XGT_OPTS=--copyright-holder=$(COPY) --package-name=$(PKG)
all: $(MOFILES)
clean:
rm -f $(MOFILES) *~ *.orig
rm -f `find . -name '*.mo'`
rmdir `find * -depth -type d`
chirpui.pot:
/usr/bin/find ../chirpui -name '*.py' > .files
xgettext -L Python -k_ -o chirpui.pot -f .files $(XGT_OPTS)
%.po: chirpui.pot
if [ -f $@ ]; then \
msgmerge -U $@ chirpui.pot; \
else \
msginit --input=chirpui.pot --locale=$(@:%.po=%); \
fi
%/LC_MESSAGES/CHIRP.mo: %.po
mkdir -p $(shell dirname $@)
msgfmt --output-file=$@ $^