Release diogenes-0.9.22
[diogenes.git] / po / Makefile
... / ...
CommitLineData
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
6APPLICATION = diogenes
7MSGFMT = msgfmt --statistics -c -v -o
8MSGFMTSOL = msgfmt -v -o
9MSGMERGE = msgmerge -U
10XGETTEXT = xgettext
11XGETTEXT_OPTS = -j -k__ -o
12PHPFILES = find htdocs include -name "*.php"
13
14
15all: install
16
17clearlocations:
18 cd .. && ${XGETTEXT} --no-location ${XGETTEXT_OPTS} po/${APPLICATION}.pot `${PHPFILES}`
19 cd .. && ${XGETTEXT} --add-location ${XGETTEXT_OPTS} po/${APPLICATION}.pot `${PHPFILES}`
20
21xgettext:
22 cd .. && ${XGETTEXT} ${XGETTEXT_OPTS} po/${APPLICATION}.pot `${PHPFILES}`
23
24%.po: ${APPLICATION}.pot
25 @echo "Updating .po files from .pot:"
26 ${MSGMERGE} $@ $<
27
28install: *.po
29 @echo "Checking for os ... ${OSTYPE}"; \
30 if test "${OSTYPE}" = "solaris"; then \
31 echo "You'll probably get some warnings on Solaris. This is normal."; \
32 fi; \
33 for LOCALE in `ls *.po | sed 's/\.[^.]*$$//g'`; do \
34 if test $${LOCALE}.po = "messages.po"; then \
35 continue; \
36 fi; \
37 echo "Compiling locale $${LOCALE}:"; \
38 if ./shtool mkdir -p ../locale/$${LOCALE}/LC_MESSAGES; then \
39 if test "${OSTYPE}" = "solaris"; then \
40 if ${MSGFMTSOL} ../locale/$${LOCALE}/LC_MESSAGES/${APPLICATION}.mo $${LOCALE}.po; then \
41 echo " ... done"; \
42 echo; \
43 else \
44 echo " ... FAILED"; \
45 echo; \
46 fi \
47 else \
48 if ${MSGFMT} ../locale/$${LOCALE}/LC_MESSAGES/${APPLICATION}.mo $${LOCALE}.po; then \
49 echo " ... done"; \
50 echo; \
51 else \
52 echo " ... FAILED"; \
53 echo; \
54 fi \
55 fi; \
56 else \
57 echo "Could not create locale directory for $${LOCALE}."; \
58 fi \
59 done;