~ubuntu-branches/ubuntu/karmic/zeroinstall-injector/karmic

« back to all changes in this revision

Viewing changes to Makefile

  • Committer: Bazaar Package Importer
  • Author(s): Thomas Leonard
  • Date: 2009-04-05 10:40:06 UTC
  • mfrom: (1.1.9 upstream) (6.1.5 sid)
  • Revision ID: james.westby@ubuntu.com-20090405104006-e3x93j5ibvjqu65a
Tags: 0.39-1ubuntu1
* Updated build for Python 2.6.
* FFe: LP: #336317.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
 
 
2
 
 
3
PYTHON=python
 
4
 
 
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/')
 
8
 
 
9
all: translations
 
10
        $(PYTHON) setup.py build
 
11
 
 
12
translations: $(MO)
 
13
 
 
14
install: all
 
15
        $(PYTHON) setup.py install
 
16
 
 
17
%.mo: %.po
 
18
        msgfmt -o "$@" "$<"
 
19
 
 
20
%.glade.h: %.glade
 
21
        intltool-extract --type=gettext/glade --update "$<"
 
22
 
 
23
locale/zero-install.pot: $(PY) $(GLADE)
 
24
        xgettext --language=Python --output=$@ --keyword=_ --keyword=N_ $^
 
25
 
 
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
 
31
 
 
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
 
39
 
 
40
.PHONY: all install update-po check-po clean