From f9b563391d592e43ab9e140fd717c41fee44b18d Mon Sep 17 00:00:00 2001 From: taffit Date: Mon, 27 Feb 2012 05:24:39 +0000 Subject: [PATCH] Adapt Makefile to po4a improvements (1st pass: make it build, more simplifications to do) git-svn-id: svn://anonscm.debian.org/ddp/manuals/trunk/developers-reference@9105 313b444b-1b9f-4f58-a734-7bb04f332e8d --- Makefile | 29 ++++++++++++++--------------- debian/changelog | 1 + 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/Makefile b/Makefile index cfc064b..88de4bf 100644 --- a/Makefile +++ b/Makefile @@ -27,8 +27,7 @@ XL=xmllint --nonet --noout --postvalid --xinclude # - fop is currently in contrib, but can go to main, see #366783 # - xmlroff (not mature enough, #182445) DBLATEX=dblatex --style=db2latex -# The "--keep 0" should be removed as soon as the translations are ready -TRANSLATE=po4a-translate --format docbook --keep 0 +TRANSLATE=po4a po4a/po4a.cfg # XSL files and parameters # note: the URL is used as identifier, no HTTP is used! @@ -75,12 +74,13 @@ index.html: $(CURDIR)/developers-reference.html .PRECIOUS: %.dbk %.ent ifndef LINGUA %.dbk %.ent: FORCE + $(TRANSLATE) $(MAKE) $@ LINGUA=`basename $(@D)` FORCE: else -$(LINGUA)/%.dbk: %.dbk $(patsubst %.dbk,po4a/$(LINGUA)/%.po,%.dbk) - $(TRANSLATE) -m $< -p po4a/$(@:.dbk=.po) -l $@ -a ?po4a/$(@:.dbk=.add) +$(LINGUA)/%.dbk: %.dbk po4a/$(LINGUA).po + $(TRANSLATE) $(LINGUA)/common.ent: common.ent cd $(@D) && ln -sf ../$(@F) . @@ -103,26 +103,25 @@ developers-reference.pdf: $(CURDIR)/developers-reference.pdf && mv $(@D)/index.dbk.pdf $@ .PHONY: pot -pot: $(patsubst %.dbk,po4a/po/%.pot,$(SOURCES)) -po4a/po/%.pot: %.dbk - po4a-gettextize --format docbook --master $< --po $@ +pot: po4a/po/developers-reference.pot +po4a/po/developers-reference.pot: %.dbk + $(TRANSLATE) ifdef LINGUA .PHONY: updatepo -updatepo: $(patsubst %.dbk,po4a/$(LINGUA)/%.po,$(SOURCES)) -po4a/$(LINGUA)/%.po: %.dbk - po4a-updatepo --previous --format docbook --master $< --po $@ +updatepo: po4a/po/$(LINGUA).po +po4a/po/$(LINGUA).po: %.dbk + $(TRANSLATE) endif tidypo: - for po in $(wildcard po4a/*/*.po po4a/*/*.pot); do \ - msgcat $$po > $$po.tmp && mv $$po.tmp $$po; \ + for po in po4a/po/*.po; do \ + msgcat -o $$po $$po; \ done checkpo: - @for po in $(wildcard po4a/*/*.po po4a/*/*.pot); do \ - echo $$po; \ - msgfmt --check --verbose $$po; \ + @for po in po4a/po/*.po; do \ + msgfmt -vv $$po; \ done %/version.ent: diff --git a/debian/changelog b/debian/changelog index c4ebdb6..327da7e 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,6 +1,7 @@ developers-reference (3.4.8) UNRELEASED; urgency=low * Move away po4a handling in its own directory with a single config file. + * Adapt Makefile to the current po4a tree. -- David Prévot Mon, 27 Feb 2012 01:08:49 -0400 -- 2.30.2