# $Horde: horde/po/Makefile,v 1.2.2.3 2002/05/20 17:36:22 jan Exp $
#
-APPLICATION = banana
MSGFMT = msgfmt --statistics -c -v -o
MSGFMTSOL = msgfmt -v -o
MSGMERGE = msgmerge -U
-XGETTEXT = xgettext --from-code=iso-8859-15 -j -k_b_ -o
-PHPFILES = find banana -name "*.php"
+LANGS:=$(shell ls *.po|sed -e s/\.po$$//)
+APPLICATION = banana
+
+all: banana.pot ${LANGS:=.lang}
+ if test "${OSTYPE}" = "solaris"; then \
+ echo "You'll probably get some warnings on Solaris. This is normal."; \
+ fi;
+banana.pot: ../banana/*.php
+ xgettext --from-code=iso-8859-15 -j -k_b_ -o banana.pot $<
-all: install
+%.lang: ../locale/%/LC_MESSAGES/banana.mo %.po
+ @echo Updating for lang %
-xgettext:
- cd .. && ${XGETTEXT} po/${APPLICATION}.pot `${PHPFILES}`
-%.po: ${APPLICATION}.pot
- @echo "Updating .po files from .pot:"
+%.po: banana.pot
${MSGMERGE} $@ $<
-install: *.po
- @echo "Checking for os ... ${OSTYPE}"; \
- if test "${OSTYPE}" = "solaris"; then \
- echo "You'll probably get some warnings on Solaris. This is normal."; \
- fi; \
+
+
+build: *.po
for LOCALE in `ls *.po | sed 's/\.[^.]*$$//g'`; do \
if test $${LOCALE}.po = "messages.po"; then \
continue; \