Fixes vim mode line.
[banana.git] / po / Makefile
1 # Horde .mo files makefile
2 #
3 # $Horde: horde/po/Makefile,v 1.2.2.3 2002/05/20 17:36:22 jan Exp $
4 #
5
6 LANGS:=$(shell ls *.po|sed -e s/\.po$$//)
7
8 all: banana.pot ${LANGS:=.lang}
9
10 clean:
11 rm -f *.po~ *.lang
12
13 banana.pot:
14 @echo Parsing Tree for new messages
15 @echo
16 @echo "<?php " > template.php
17 @grep "|b" ../banana/templates/*.tpl | sed 's/\(.*\)\("[^"]*"\)|b\(.*\)/$var = _b_(\2);/g' >> template.php
18 @echo "?>" >> template.php
19 @xgettext --from-code=UTF-8 -j -k_b_ -o banana.pot ../banana/*.php ./template.php
20 @rm template.php
21
22 %.lang: banana.pot ../banana/*.php %.po
23 @echo Generating $(@:.lang=.po)
24 @echo -n ' '
25 @mkdir -p ../locale/$(@:.lang=)/LC_MESSAGES/
26 @msgmerge -U $(@:lang=po) $< 2> /dev/null
27 @msgfmt --statistics -c -v -o ../locale/$(@:.lang=)/LC_MESSAGES/banana.mo $(@:lang=po)
28 @echo
29 @rm -f $(@:lang=po~)
30 @touch $@
31
32