From fe98a3e3cb3d4c2f53853f097d769c782767f113 Mon Sep 17 00:00:00 2001 From: Lukas Fleischer Date: Thu, 7 Apr 2011 12:00:32 +0200 Subject: Add "%.po-update" and "update-po" targets to Makefile. Those can be used as a shortcut to msgmerge(1) to update one ("$locale.po-update") or all ("update-po") portable object files with new strings from the message catalog ("aur.pot"). Signed-off-by: Lukas Fleischer --- po/Makefile | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/po/Makefile b/po/Makefile index 18c6357..9b4ff65 100644 --- a/po/Makefile +++ b/po/Makefile @@ -26,6 +26,8 @@ POFILES = \ MOFILES = ${POFILES:.po=.mo} LOCALES = ${MOFILES:.mo=} +UPDATEPOFILES = ${POFILES:.po=.po-update} + MSGID_BUGS_ADDRESS = https://bugs.archlinux.org/index.php?project=2 all: ${MOFILES} @@ -33,6 +35,10 @@ all: ${MOFILES} %.mo: %.po msgfmt -o $@ $< +%.po-update: %.po aur.pot + lang=`echo $@ | sed -e 's/\.po-update$$//'`; \ + msgmerge -U --no-location --lang="$$lang" $< aur.pot + update-pot: pkgname=AUR; \ pkgver=`sed -n 's/.*"AUR_VERSION", "\(.*\)".*/\1/p' ../web/lib/version.inc`; \ @@ -42,8 +48,11 @@ update-pot: --msgid-bugs-address='${MSGID_BUGS_ADDRESS}' \ --directory ../web --files-from POTFILES -o aur.pot +update-po: + ${MAKE} ${UPDATEPOFILES} + clean: - rm *.mo + rm *.mo *.po\~ install: all for l in ${LOCALES}; do mkdir -p ${DESTDIR}${PREFIX}/$$l/LC_MESSAGES/; done @@ -52,4 +61,4 @@ install: all uninstall: for l in ${LOCALES}; do rm -rf ${DESTDIR}${PREFIX}/$$l/LC_MESSAGES/; done -.PHONY: all update-pot clean install uninstall +.PHONY: all update-pot update-po clean install uninstall -- cgit v1.2.3-70-g09d2