summaryrefslogtreecommitdiffstats
path: root/po4a/Makefile
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-27 09:36:25 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-27 09:36:25 +0000
commit6077d258b500b20e1e705f5cda567400240c7804 (patch)
treea5d41c050bd69f91476994b0d30c0a8f1e7957b5 /po4a/Makefile
parentInitial commit. (diff)
downloaddevscripts-6077d258b500b20e1e705f5cda567400240c7804.tar.xz
devscripts-6077d258b500b20e1e705f5cda567400240c7804.zip
Adding upstream version 2.21.3+deb11u1.upstream/2.21.3+deb11u1upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'po4a/Makefile')
-rw-r--r--po4a/Makefile42
1 files changed, 42 insertions, 0 deletions
diff --git a/po4a/Makefile b/po4a/Makefile
new file mode 100644
index 0000000..c84a2b1
--- /dev/null
+++ b/po4a/Makefile
@@ -0,0 +1,42 @@
+include ../Makefile.common
+
+LANGS = de fr pt
+
+DESC_de/ = Debian-Hilfswerkzeuge
+DESC_fr/ = Utilitaires Debian
+DESC_pt/ = Utilitários Debian
+
+GEN_TR_MAN1S := $(sort $(foreach lang,$(LANGS),$(patsubst %.1,$(lang)/%.$(lang).1,$(GEN_MAN1S))))
+
+all: translate
+# GEN_TR_MAN1S needs translate finished, serialize the calls
+ @$(MAKE) transform
+transform: $(GEN_TR_MAN1S)
+
+translate: ../doc/devscripts.1
+ po4a --previous --no-backups --keep=0 devscripts-po4a.conf
+ touch $@
+
+clean: ../doc/devscripts.1
+ po4a --previous --rm-translations --no-backups devscripts-po4a.conf
+ rm -f $(GEN_TR_MAN1S) translate
+ rm -rf $(LANGS)
+
+../doc/devscripts.1:
+ # po4a translate and clean need ../doc/devscripts.1, rebuild it
+ $(MAKE) -C ../doc devscripts.1
+
+%.1:: %.pl translate
+ podchecker $<
+ pod2man --utf8 --center=" " --release="$(DESC_$(dir $@))" $< > $@
+%.1:: %.pod translate
+ podchecker $<
+ pod2man --utf8 --center=" " --release="$(DESC_$(dir $@))" $< > $@
+%.1:: %.dbk translate
+ xsltproc --nonet \
+ /usr/share/sgml/docbook/stylesheet/xsl/nwalsh/manpages/docbook.xsl $<
+ # /usr/share/sgml/docbook/stylesheet/xsl/nwalsh/manpages/other.xsl
+ # (which is imported by the above stylesheet) insists in writing the output
+ # to where it wants to. we can only move the file ourselves.
+ # ($* → de/deb-reversion.de)
+ mv $(notdir $(basename $*)).1 $@