1 # $Id: Makefile,v 1.7 2002-01-05 13:42:29 carstenklapp Exp $
5 # This is a replacement for locale/translate.sh to avoid remaking
6 # files that don't need to be remade.
9 ALL_LINGUAS = nl es de sv it
11 PO_FILES = $(patsubst %, po/%.po, ${ALL_LINGUAS})
12 MO_FILES = $(patsubst %, %/LC_MESSAGES/phpwiki.mo, ${ALL_LINGUAS})
13 PHP_FILES = ${MO_FILES:.mo=.php}
15 PHP_SRC := $(wildcard ../templates/*.html ../lib/plugin/*.php \
16 ../lib/*.php ../lib/WikiDB/backend/*.php ../lib/WikiDB/*.php)
22 mo : ${MO_FILES} ${PHP_FILES}
24 po/phpwiki.pot : ${PHP_SRC}
25 xgettext -L C++ -k_ -k__printf -k__sprintf -k__vsprintf -o $@ $^
27 po/%.po : po/phpwiki.pot
28 test -f $@ || touch $@
30 msgmerge -o $@.new $@~ $^ && mv -f $@.new $@
32 %/LC_MESSAGES/phpwiki.mo : po/%.po
33 mkdir -p $*/LC_MESSAGES
36 # Generate .php from .mo rather than .po to maximize
37 # the probability of agreement between .mo and .php files.
38 %/LC_MESSAGES/phpwiki.php : %/LC_MESSAGES/phpwiki.mo
39 msgunfmt $< | awk -f make-php-trans.awk > $@
41 clean : # Nothing to be done for 'clean'.