Release 0.40
[zeroinstall/zeroinstall-rsl.git] / Makefile
blob5fb924c5a162cb2c9e6e82a3f8eb5f71e9aad420
3 PYTHON=python
5 MO = $(shell find locale -name '*.po' | sed -e 's/\.po/\.mo/')
6 PY = $(shell find zeroinstall -name '*.py')
7 GLADE = $(shell find zeroinstall -name '*.glade' | sed -e 's/\.glade/&.h/')
9 all: translations
10 $(PYTHON) setup.py build
12 translations: $(MO)
14 install: all
15 $(PYTHON) setup.py install
17 %.mo: %.po
18 msgfmt -o "$@" "$<"
20 %.glade.h: %.glade
21 intltool-extract --type=gettext/glade --update "$<"
23 locale/zero-install.pot: $(PY) $(GLADE)
24 xgettext --language=Python --output=$@ --keyword=_ --keyword=N_ $^
26 update-po: locale/zero-install.pot
27 @for po in locale/*/LC_MESSAGES/zero-install.po; do \
28 echo -e "Merge: $$po: \c"; \
29 msgmerge -v -U $$po locale/zero-install.pot; \
30 done
32 check-po:
33 @for po in locale/*/LC_MESSAGES/zero-install.po; do \
34 echo -e "Check: $$po: \c"; \
35 msgfmt -o /dev/null --statistics -v -c $$po; \
36 done
37 clean:
38 $(PYTHON) setup.py clean
40 .PHONY: all install update-po check-po clean