more i18n stuff, spanish translation draft
[clawsker.git] / po / Makefile
1 #
2 # Clawsker po makefile
3 # $Id$
4 #
5
6 NAME = clawsker
7 PREFIX ?= /usr/local
8 DATADIR = ${PREFIX}/share
9 LOCALEDIR = ${DATADIR}/locale
10
11 XG_ARGS = "--keyword=_ --flag=_:1:pass-java-format -L Perl -w 80"
12 LINGUAS = "es"
13
14 all: build
15
16 update-pot:
17         xgettext ${XG_ARGS} -f ./POTFILES -d ${NAME} -o ./${NAME}.pot
18
19 build:
20         for po in ${LINGUAS}; \
21         do msgfmt -c -o t-$${po} $${po}.po && mv -f t-$${po} $${po}.mo; \
22         done
23         
24
25 install: all install-dirs
26         for po in ${LINGUAS}; \
27         do install -m 0755 $${po}.mo ${DESTDIR}${LOCALEDIR}/$${po}/LC_MESSAGES/${NAME}.mo; \
28         done
29
30 install-dirs:
31         for po in ${LINGUAS}; \
32         do install -d ${DESTDIR}${LOCALEDIR}/$${po}/LC_MESSAGES; \
33         done
34
35 uninstall:
36         for po in ${LINGUAS}; \
37         do rm -f  ${DESTDIR}${LOCALEDIR}/$${po}/LC_MESSAGES/${NAME}.mo; \
38         done
39
40 clean-build:
41
42 clean:
43         rm -f *.mo *~
44
45 .PHONY: all build install install-dirs uninstall clean clean-build update-pot
46