chiark / gitweb /
po/list-documents: Set translation threshold to 10%
[dgit.git] / po4a / Makefile
index 3a3310db223dbc8b497976ab57dbef3832f54f84..c759ce841a44962477b9676a887709e51d7c473b 100644 (file)
 
 default: pofiles
 
-all: translated-always
+include ../i18n-common.make
+PO4A ?= po4a
 
-pofiles: po4a.cfg
-       po4a --no-translations $<
-
-e=set -e; exec >$@.tmp
-f=mv -f $@.tmp $@
-o= >$@.tmp && $f
+all update: translated
 
-S=@
-# Set S='' to see commands being run
+pofiles: po4a.cfg
+       $(PO4A) --no-translations $<
 
 translated: po4a.cfg
-       po4a $<
+       $(PO4A) $<
 
 po4a.cfg: list-documents
        ./$< $o
@@ -107,7 +103,7 @@ p = ../po4a
 translated-only: po4a.cfg
        rm -rf $t && mkdir $t
        cd $t && ln -s $p/*.po $p/*.pot $p/po4a.cfg .
-       cd $t && po4a po4a.cfg
+       cd $t && $(PO4A) po4a.cfg
        ! test -d $t/translated || \
        cp -al --remove-destination $t/translated .
 
@@ -119,7 +115,7 @@ translated-only: po4a.cfg
 .PRECIOUS: .po4a.%.cfg
 
 preview.%: .po4a.%.cfg
-       $S po4a $<
+       $S $(PO4A) $<
        $S ./install-documents >/dev/null .$*.translated $@
        @ echo '# runes to preview the various final tranlated manpages:'
        $S find $@ -type f -printf 'man -l %p\n'