From a08a6d0579fe475f166f2d259911b048d682c30a Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Wed, 23 Nov 2016 00:15:10 -0500 Subject: PO/Makefile: tidy This DOES NOT change the behavior of the Makefile, it just improves the way it is written a bit. IMO, the `POTFILES` file should only have the mtime bumped if the contents change; but that deficiency is inherited from the old implementation. --- po/Makefile | 38 ++++---------------------------------- 1 file changed, 4 insertions(+), 34 deletions(-) diff --git a/po/Makefile b/po/Makefile index d0ed741..9d54777 100644 --- a/po/Makefile +++ b/po/Makefile @@ -1,36 +1,7 @@ DESTDIR = .. PREFIX = /web/locale -POFILES = \ - ar.po \ - ast.po \ - ca.po \ - cs.po \ - da.po \ - de.po \ - el.po \ - es.po \ - es_419.po \ - fi.po \ - fr.po \ - he.po \ - hr.po \ - hu.po \ - it.po \ - ja.po \ - nb.po \ - nl.po \ - pl.po \ - pt_BR.po \ - pt_PT.po \ - ro.po \ - ru.po \ - sk.po \ - sr.po \ - tr.po \ - uk.po \ - zh_CN.po \ - zh_TW.po +POFILES = $(wildcard *.po) MOFILES = ${POFILES:.po=.mo} LOCALES = ${MOFILES:.mo=} @@ -48,7 +19,7 @@ all: ${MOFILES} lang=`echo $@ | sed -e 's/\.po-update$$//'`; \ msgmerge -U --no-location --lang="$$lang" $< aur.pot -POTFILES: +POTFILES: FORCE find ../web -type f -name '*.php' -printf '%P\n' | sort >POTFILES update-pot: POTFILES @@ -60,8 +31,7 @@ update-pot: POTFILES --msgid-bugs-address='${MSGID_BUGS_ADDRESS}' \ --directory ../web --files-from POTFILES -o aur.pot -update-po: - ${MAKE} ${UPDATEPOFILES} +update-po: ${UPDATEPOFILES} clean: rm -f *.mo *.po\~ POTFILES @@ -73,4 +43,4 @@ install: all uninstall: for l in ${LOCALES}; do rm -rf ${DESTDIR}${PREFIX}/$$l/LC_MESSAGES/; done -.PHONY: all update-pot update-po clean install uninstall POTFILES +.PHONY: all update-pot update-po clean install uninstall FORCE -- cgit v1.2.3