From 35e6388fad2226d00a3c82fc63f63373f1c84fad Mon Sep 17 00:00:00 2001 From: Lukas Fleischer Date: Sun, 27 Jul 2014 21:54:38 +0200 Subject: Auto-generate po/POTFILES Reduce maintenance costs by auto-generating po/POTFILES in the Makefile. Signed-off-by: Lukas Fleischer --- po/Makefile | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'po/Makefile') diff --git a/po/Makefile b/po/Makefile index 97e1822..49eab32 100644 --- a/po/Makefile +++ b/po/Makefile @@ -44,7 +44,10 @@ all: ${MOFILES} lang=`echo $@ | sed -e 's/\.po-update$$//'`; \ msgmerge -U --no-location --lang="$$lang" $< aur.pot -update-pot: +POTFILES: + find ../web -type f -name '*.php' -printf '%P\n' | sort >POTFILES + +update-pot: POTFILES pkgname=AUR; \ pkgver=`sed -n 's/.*"AUR_VERSION", "\(.*\)".*/\1/p' ../web/lib/version.inc.php`; \ xgettext --default-domain=aur -L php --keyword=__ --keyword=_n:1,2 \ @@ -57,7 +60,7 @@ update-po: ${MAKE} ${UPDATEPOFILES} clean: - rm -f *.mo *.po\~ + rm -f *.mo *.po\~ POTFILES install: all for l in ${LOCALES}; do mkdir -p ${DESTDIR}${PREFIX}/$$l/LC_MESSAGES/; done -- cgit v1.2.3-54-g00ecf