start move to dbconfig-common based idb configuration
[diogenes.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 APPLICATION = diogenes
7 MSGFMT = msgfmt --statistics -c -v -o
8 MSGFMTSOL = msgfmt -v -o
9 MSGMERGE = msgmerge -U
10 XGETTEXT = xgettext
11 XGETTEXT_OPTS = -j -k__ -o
12 PHPFILES = find htdocs include -name "*.php"
13
14
15 all: install
16
17 clearlocations:
18 cd .. && ${XGETTEXT} --no-location ${XGETTEXT_OPTS} po/${APPLICATION}.pot `${PHPFILES}`
19 cd .. && ${XGETTEXT} --add-location ${XGETTEXT_OPTS} po/${APPLICATION}.pot `${PHPFILES}`
20
21 xgettext:
22 cd .. && ${XGETTEXT} ${XGETTEXT_OPTS} po/${APPLICATION}.pot `${PHPFILES}`
23
24 %.po: ${APPLICATION}.pot
25 @echo "Updating .po files from .pot:"
26 ${MSGMERGE} $@ $<
27
28 install: *.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;