all: messages.pot mofiles
-e=set -e; exec >$@.tmp
-f=mv -f $@.tmp $@
-o= >$@.tmp && $f
-
-S=@
-# Set S='' to see commands being run
+include ../i18n-common.make
.%.potfiles:
$S $e; echo ../$*; $f
sed "s#^#.$*.pot: #" $<; \
$f
-# echo 'MOS_$$(addsuffix'
-# find -name $*.mo |sed ; $f
-
-include .dgit.make
-include .git-debrebase.make
-include .common.make
%.mo: %.po
$S msgfmt -o $@ $<
-XGETTEXT_OPTS += -Lperl -k__ -k___
+XGETTEXT_OPTS += -Lperl -k__ -kf_ -ki_
XGETTEXT_OPTS += --from-code=UTF-8
XGETTEXT_OPTS += --package-name=dgit --package-version=ongoing
# The --package-* avoids this error from make check's `msgfmt -c'
.PRECIOUS: .%.potfiles
-all-po: $(POFILES)
+pofiles: $(POFILES)
+
+update: pofiles check
-check: $(if $(SUPPRESS_PO_UPDATE),,all-po)
+check: $(if $(SUPPRESS_PO_UPDATE),,pofiles)
$S set -e; for file in $(POFILES); do \
lang=`echo $$file | sed 's/\.po//'`; \
printf "$$lang: "; \