extended Makefile
[enigma2.git] / po / Makefile
1 #GETTEXT=./pygettext.py
2 GETTEXT=xgettext
3
4 MSGFMT = ./msgfmt.py
5 #MSGFMT = msgfmt
6
7 LANGS := de en
8 LANGPO := $(foreach LANG, $(LANGS),$(LANG).po)
9 LANGMO := $(foreach LANG, $(LANGS),$(LANG).mo)
10
11 default: enigma2.pot $(LANGPO) merge $(LANGMO)
12         -mkdir -p de/LC_MESSAGES
13         cp de.mo de/LC_MESSAGES/enigma2.mo
14
15         -mkdir -p en/LC_MESSAGES
16         cp en.mo en/LC_MESSAGES/enigma2.mo
17
18 merge:
19         msgmerge -U de.po enigma2.pot
20
21 enigma2.pot:
22         $(GETTEXT)      -d enigma2 -s -o enigma2.pot \
23                         ../lib/python/Screens/ScanSetup.py \
24                         ../lib/python/Screens/NetworkSetup.py \
25                         ../lib/python/Screens/Satconfig.py \
26                         ../lib/python/Components/Language.py \
27                         ../data/menu.xml 
28                         
29
30
31 %.mo: %.po
32         $(MSGFMT) -o $@ $<
33
34 %.po:
35         msginit -l $@ -o $@ -i enigma2.pot --no-translator
36         
37
38 clean:
39         rm *.mo *.pot