From c170cbc7081230155d0f41039f3b2267be5e4fe5 Mon Sep 17 00:00:00 2001 From: Daniel Hartwig Date: Wed, 30 May 2012 11:57:09 +0800 Subject: Remove redundancy in doc build system Lots of code was duplicated between makefiles for the various translations. Much of this is now in common rules files making it easier to add new translations. Translations that use po4a and provide full documentation have been updated to use the new includes. Some work is still required to make this compatible with the non-po4a and partial translations. * doc/common.mk: - common rules for doc makefiles * doc/po4a.mk: - common rules for po4a makefiles * doc/po4a/po4a.cfg: - new po files are picked up automatically - translate also safety-cost-level-diagram.svg * doc/po4a/Makefile.am: - update-po only updates the po files * doc/po4a/po/Makefile.am: - include aptitude.pot in dist files * doc/{es,fr,it}/Makefile.am: - use common rules --- .gitignore | 15 ++ NEWS | 8 + doc/Makefile.am | 18 +- doc/common.mk | 69 +++++++ doc/es/Makefile.am | 74 +------ doc/es/images/Makefile.am | 2 +- doc/es/images/search-tier-diagram.svg | 358 ---------------------------------- doc/fr/Makefile.am | 78 +------- doc/fr/fixman | 5 +- doc/it/Makefile.am | 78 +------- doc/po4a.mk | 21 ++ doc/po4a/po/Makefile.am | 2 +- doc/po4a/po4a.cfg | 28 +-- 13 files changed, 160 insertions(+), 596 deletions(-) create mode 100644 doc/common.mk delete mode 100644 doc/es/images/search-tier-diagram.svg create mode 100644 doc/po4a.mk diff --git a/.gitignore b/.gitignore index 19683d8c..27ddf375 100644 --- a/.gitignore +++ b/.gitignore @@ -115,6 +115,21 @@ doc/fr/manpage.xml doc/fr/output-html/ doc/fr/output-man/ doc/fr/output-txt/ +doc/it/Makefile +doc/it/Makefile.in +doc/it/README.it +doc/it/aptitude.it.8 +doc/it/aptitude.it.8.tmp +doc/it/aptitude.xml +doc/it/doc-css-stamp +doc/it/doc-html-stamp +doc/it/doc-stamp +doc/it/images/Makefile +doc/it/images/Makefile.in +doc/it/manpage.xml +doc/it/output-html/ +doc/it/output-man/ +doc/it/output-txt/ doc/ja/Makefile doc/ja/Makefile.in doc/ja/README.ja diff --git a/NEWS b/NEWS index 7c1e19a5..38e79ac0 100644 --- a/NEWS +++ b/NEWS @@ -58,6 +58,14 @@ earlier releases. * [curses]: Update package views after 'Cancel pending actions' (Closes: #595753) +- Build system changes: + + * Remove redundancy in doc build system + + Lots of code was duplicated between makefiles for the + various translations. Much of this is now in common + rules files making it easier to add new translations. + - Documentation: * [doc]: Add doctype headers to html docs. diff --git a/doc/Makefile.am b/doc/Makefile.am index d901fbf7..22de1536 100644 --- a/doc/Makefile.am +++ b/doc/Makefile.am @@ -2,13 +2,17 @@ SUBDIRS=cs de en es fi fr it ja pl po4a EXTRA_DIST=aptitude-common.xsl aptitude-html.xsl aptitude-man.xsl aptitude-txt.xsl aptitude.css fixup-text html-to-text -if USE_PO4A +PO4AFLAGS="--srcdir=$(top_srcdir)/doc" "--destdir=$(top_builddir)/doc" \ + "$(top_srcdir)/doc/po4a/po4a.cfg" -dist distdir: po4a-dist +dist distdir: update-po -update-po: po4a-dist +update-po: + if [ -n "$(PO4A)" ]; then \ + $(PO4A) \ + --no-translations \ + "--package-name=$(PACKAGE)" "--package-version=$(VERSION)" \ + $(PO4AFLAGS); \ + fi -po4a-dist: - -@cd $(srcdir) && po4a -M utf-8 -k 0 po4a/po4a.cfg - -endif +.PHONY: update-po diff --git a/doc/common.mk b/doc/common.mk new file mode 100644 index 00000000..b78ca753 --- /dev/null +++ b/doc/common.mk @@ -0,0 +1,69 @@ +MANPAGE=aptitude.$(LANGCODE).8 +README=README.$(LANGCODE) + +HTML2TEXT=$(top_srcdir)/doc/html-to-text + +# Put documentation in /usr/share/doc/aptitude (by default) +localemandir=$(mandir)/$(LANGCODE) +htmldir=$(docdir)/html/$(LANGCODE) + +images/%.png: images/%.svg + rsvg-convert -x 1.5 -y 1.5 -f png -o $@ $< + +all-local: doc-stamp + +clean-local: + -rm -fr output-html/ output-txt/ output-man/ + -rm -f doc-stamp doc-css-stamp doc-html-stamp doc-txt-stamp doc-man-stamp + -rm -fr $(MANPAGE) $(README) *.tmp + +doc-stamp: doc-html-stamp doc-css-stamp $(README) $(MANPAGE) + touch doc-stamp + +install-data-hook: + $(mkinstalldirs) $(DESTDIR)$(localemandir)/man8 + $(INSTALL_DATA) $(MANPAGE) $(DESTDIR)$(localemandir)/man8/aptitude.8 + + $(mkinstalldirs) $(DESTDIR)$(htmldir)/images + $(INSTALL_DATA) output-html/*.html output-html/*.css $(DESTDIR)$(htmldir) + $(INSTALL_DATA) output-html/images/* $(DESTDIR)$(htmldir)/images + + $(mkinstalldirs) $(DESTDIR)$(pkgdatadir) + $(INSTALL_DATA) $(README) $(DESTDIR)$(pkgdatadir) + +$(MANPAGE): $(XMLSOURCES) $(top_srcdir)/doc/aptitude-man.xsl + -rm -fr output-man $(MANPAGE) + xsltproc -o output-man/aptitude.8 $(top_srcdir)/doc/aptitude-man.xsl aptitude.xml + mv output-man/aptitude.8 $(MANPAGE) + + if [ -x "$(srcdir)/fixman" ]; then \ + "$(srcdir)/fixman"; \ + fi + +$(README): $(XMLSOURCES) $(top_srcdir)/doc/aptitude-txt.xsl + -rm -fr output-txt/ + xsltproc -o output-txt/index.html $(top_srcdir)/doc/aptitude-txt.xsl aptitude.xml + $(HTML2TEXT) output-txt/index.html > $(README) + +doc-css-stamp: doc-html-stamp $(top_srcdir)/doc/aptitude.css + rm -f output-html/aptitude.css + cp $(top_srcdir)/doc/aptitude.css output-html/ + touch doc-css-stamp + +doc-html-stamp: $(XMLSOURCES) $(top_srcdir)/doc/aptitude-html.xsl $(IMAGES) + -rm -fr output-html/ + + xsltproc -o output-html/ $(top_srcdir)/doc/aptitude-html.xsl aptitude.xml + + mkdir output-html/images/ + ln -f $(srcdir)/images/*.png output-html/images/ + for x in caution important note tip warning; do \ + ln -s /usr/share/xml/docbook/stylesheet/nwalsh/images/$$x.png \ + output-html/images/; \ + done + for x in home next prev up; do \ + ln -s /usr/share/xml/docbook/stylesheet/nwalsh/images/$$x.gif \ + output-html/images/; \ + done + + touch doc-html-stamp diff --git a/doc/es/Makefile.am b/doc/es/Makefile.am index 7be19a84..89451b50 100644 --- a/doc/es/Makefile.am +++ b/doc/es/Makefile.am @@ -1,74 +1,12 @@ # automake doesn't play nicely with DocBook :( -SUBDIRS=images +include $(top_srcdir)/doc/common.mk +include $(top_srcdir)/doc/po4a.mk +SUBDIRS=images +EXTRA_DIST= LANGCODE=es -MANPAGE=aptitude.$(LANGCODE).8 -# How much of the manual should actually at least be translated. -PERCENT_TRANSLATED=0 # status: 0.75% -MANPAGE_PERCENT_TRANSLATED=0 # status: 31% -README=README.$(LANGCODE) -XMLSOURCES=aptitude.xml manpage.xml $(srcdir)/../aptitude-common.xsl - -HTML2TEXT=$(srcdir)/../html-to-text - -# Put documentation in /usr/share/doc/aptitude (by default) -docdir=$(datadir)/doc/$(PACKAGE) -localemandir=$(mandir)/$(LANGCODE) -htmldir=$(docdir)/html/$(LANGCODE) - -IMAGES = $(wildcard $(srcdir)/images/*.png) - -all-local: doc-stamp - -clean-local: - -rm -fr output-html/ output-txt/ output-man/ - -rm -f doc-stamp doc-css-stamp doc-html-stamp doc-txt-stamp doc-man-stamp - -rm -fr $(MANPAGE) $(README) *.tmp - -rm -fr aptitude.xml manpage.xml - -install-data-hook: - $(mkinstalldirs) $(DESTDIR)$(localemandir)/man8 - $(INSTALL_DATA) $(MANPAGE) $(DESTDIR)$(localemandir)/man8/aptitude.8 - $(mkinstalldirs) $(DESTDIR)$(htmldir)/images - $(INSTALL_DATA) output-html/*.html output-html/*.css $(DESTDIR)$(htmldir) - $(INSTALL_DATA) output-html/images/* $(DESTDIR)$(htmldir)/images - - $(INSTALL_DATA) README.$(LANGCODE) $(DESTDIR)$(pkgdatadir)/README.$(LANGCODE) - -doc-stamp: doc-html-stamp doc-css-stamp $(README) $(MANPAGE) - touch doc-stamp - -aptitude.xml: $(srcdir)/../en/aptitude.xml $(srcdir)/../po4a/po/$(LANGCODE).po $(srcdir)/../po4a/add_$(LANGCODE)/addendum.1.$(LANGCODE) - po4a-translate -k $(PERCENT_TRANSLATED) -M utf-8 -f docbook -m $(srcdir)/../en/aptitude.xml -p $(srcdir)/../po4a/po/$(LANGCODE).po -l aptitude.xml - -manpage.xml: $(srcdir)/../en/manpage.xml $(srcdir)/../po4a/po/$(LANGCODE).po $(srcdir)/../po4a/add_$(LANGCODE)/addendum.1.$(LANGCODE) - po4a-translate -k $(MANPAGE_PERCENT_TRANSLATED) -M utf-8 -f docbook -m $(srcdir)/../en/manpage.xml -p $(srcdir)/../po4a/po/$(LANGCODE).po -l manpage.xml - -$(MANPAGE): $(XMLSOURCES) $(srcdir)/../aptitude-man.xsl - -rm -fr output-man $(MANPAGE) - xsltproc -o output-man/aptitude.8 $(srcdir)/../aptitude-man.xsl aptitude.xml - mv output-man/aptitude.8 $(MANPAGE) - -$(README): $(XMLSOURCES) $(srcdir)/../aptitude-txt.xsl - -rm -fr output-txt - xsltproc -o output-txt/index.html $(srcdir)/../aptitude-txt.xsl aptitude.xml - $(HTML2TEXT) output-txt/index.html > $(README) - -doc-css-stamp: doc-html-stamp $(srcdir)/../aptitude.css - rm -f output-html/aptitude.css - cp $(srcdir)/../aptitude.css output-html/ - touch doc-css-stamp - -doc-html-stamp: $(XMLSOURCES) $(srcdir)/../aptitude-html.xsl $(IMAGES) - -rm -fr output-html/ - - xsltproc -o output-html/ $(srcdir)/../aptitude-html.xsl aptitude.xml - mkdir output-html/images/ - ln -f $(srcdir)/images/*.png output-html/images/ - set -e; for x in $(srcdir)/images/*.svg; do rsvg-convert -f png -o output-html/images/$$(basename $${x%.svg}.png) $$x; done - for x in caution important note tip warning; do ln -s /usr/share/xml/docbook/stylesheet/nwalsh/images/$$x.png output-html/images/; done - for x in home next prev up; do ln -s /usr/share/xml/docbook/stylesheet/nwalsh/images/$$x.gif output-html/images/; done +XMLSOURCES=aptitude.xml manpage.xml - touch doc-html-stamp +IMAGES=$(wildcard $(srcdir)/images/*.png) images/safety-cost-level-diagram.png diff --git a/doc/es/images/Makefile.am b/doc/es/images/Makefile.am index 8dc4a5b7..3e5dcb54 100644 --- a/doc/es/images/Makefile.am +++ b/doc/es/images/Makefile.am @@ -5,7 +5,7 @@ EXTRA_DIST=become-root-snapshot.png broken-snapshot.png \ limit-snapshot.png menu-snapshot.png mine-snapshot2.png \ mine-snapshot3.png mine-snapshot4.png mine-snapshot5.png \ mine-snapshot.png preview-snapshot.png search-snapshot.png \ - search-tier-diagram.svg solution-explanation-snapshot.png \ + solution-explanation-snapshot.png \ solution-reject-and-approve-snapshot.png \ solution-screen-snapshot2.png solution-screen-snapshot3.png \ solution-screen-snapshot4.png solution-screen-snapshot5.png \ diff --git a/doc/es/images/search-tier-diagram.svg b/doc/es/images/search-tier-diagram.svg deleted file mode 100644 index f473318f..00000000 --- a/doc/es/images/search-tier-diagram.svg +++ /dev/null @@ -1,358 +0,0 @@ - - - - - - - - - - - - - - - - image/svg+xml - - - - - - - - Tier 10,000: "safe" changes - - - - Tier 20,000: cancel everything - - - - Tier 40,000: break holds - - - - Tier 30,000: remove packages - - - - Tier 50,000: install from non-default sources - - - - Search - - - Minimum tier - - "Install masqmail (sid)" - "Install xteddy (sid)" - "Keep libsdl1.2debian at its current version" - - "Cancel all the user's selections at once" - "Remove libgc7-jar" - "Remove xserver-xorg-video-rendition" - "Remove python-gtk2-doc" - "Install coreutils 7.1-2 (currently held back)" - "Install xserver-xorg (experimental)" - "Install qt4-doc (experimental)" - "Install mplayer (debian-multimedia)" - - diff --git a/doc/fr/Makefile.am b/doc/fr/Makefile.am index 69e14b78..34245663 100644 --- a/doc/fr/Makefile.am +++ b/doc/fr/Makefile.am @@ -1,80 +1,12 @@ # automake doesn't play nicely with DocBook :( -SUBDIRS=images +include $(top_srcdir)/doc/common.mk +include $(top_srcdir)/doc/po4a.mk +SUBDIRS=images EXTRA_DIST=fixman LANGCODE=fr -MANPAGE=aptitude.$(LANGCODE).8 -# How much of the manual is actually translated. -PERCENT_TRANSLATED=40 -MANPAGE_PERCENT_TRANSLATED=30 - -IMAGES = $(wildcard $(srcdir)/images/*.png) - -HTML2TEXT=$(srcdir)/../html-to-text - -# Put documentation in /usr/share/doc/aptitude (by default) -docdir=$(datadir)/doc/$(PACKAGE) - -localemandir=$(mandir)/$(LANGCODE) - -# Automake automagically distributes README without asking -README=README.$(LANGCODE) - -if USE_PO4A -all-local: doc-stamp -else -all-local: -endif - -clean-local: - -rm -fr output-html/ output-txt/ output-man/ - -rm -f doc-stamp doc-css-stamp doc-html-stamp doc-txt-stamp doc-man-stamp - -rm -fr $(MANPAGE) $(README) *.tmp - -rm -fr aptitude.xml manpage.xml - -install-data-hook: - $(mkinstalldirs) $(DESTDIR)$(localemandir)/man8 - $(INSTALL_DATA) $(MANPAGE) $(DESTDIR)$(localemandir)/man8/aptitude.8 - $(mkinstalldirs) $(DESTDIR)$(docdir)/html/$(LANGCODE)/images - $(INSTALL_DATA) output-html/*.html output-html/*.css $(DESTDIR)$(docdir)/html/$(LANGCODE) - $(INSTALL_DATA) output-html/images/* $(DESTDIR)$(docdir)/html/$(LANGCODE)/images - - $(INSTALL_DATA) README.$(LANGCODE) $(DESTDIR)$(pkgdatadir)/README.$(LANGCODE) - -doc-stamp: doc-html-stamp doc-css-stamp $(README) $(MANPAGE) - touch doc-stamp - -aptitude.xml: $(srcdir)/../en/aptitude.xml $(srcdir)/../po4a/po/$(LANGCODE).po $(srcdir)/../po4a/add_$(LANGCODE)/addendum.1.$(LANGCODE) - po4a-translate -k $(PERCENT_TRANSLATED) -M utf-8 -f docbook -m $(srcdir)/../en/aptitude.xml -p $(srcdir)/../po4a/po/$(LANGCODE).po -l aptitude.xml - -manpage.xml: $(srcdir)/../en/manpage.xml $(srcdir)/../po4a/po/$(LANGCODE).po $(srcdir)/../po4a/add_$(LANGCODE)/addendum.1.$(LANGCODE) - po4a-translate -k $(MANPAGE_PERCENT_TRANSLATED) -M utf-8 -f docbook -m $(srcdir)/../en/manpage.xml -p $(srcdir)/../po4a/po/$(LANGCODE).po -l manpage.xml - -$(MANPAGE): aptitude.xml manpage.xml $(srcdir)/../aptitude-man.xsl - -rm -fr output-man - xsltproc -o output-man/aptitude.8 $(srcdir)/../aptitude-man.xsl aptitude.xml - mv output-man/aptitude.8 $(MANPAGE) - /bin/bash $(srcdir)/fixman - -$(README): aptitude.xml manpage.xml $(srcdir)/../aptitude-txt.xsl $(srcdir)/../aptitude-common.xsl - -rm -fr output-txt/ - xsltproc -o output-txt/index.html $(srcdir)/../aptitude-txt.xsl aptitude.xml - $(HTML2TEXT) output-txt/index.html > $(README) - -doc-css-stamp: doc-html-stamp $(srcdir)/../aptitude.css - rm -f output-html/aptitude.css - cp $(srcdir)/../aptitude.css output-html/ - touch doc-css-stamp - -doc-html-stamp: aptitude.xml manpage.xml $(srcdir)/../aptitude-html.xsl $(srcdir)/../aptitude-common.xsl $(IMAGES) - -rm -fr output-html/ - - xsltproc -o output-html/ $(srcdir)/../aptitude-html.xsl aptitude.xml - mkdir output-html/images/ - ln -f $(srcdir)/images/*.png output-html/images/ - for x in caution important note tip warning; do ln -s /usr/share/xml/docbook/stylesheet/nwalsh/images/$$x.png output-html/images/; done - for x in home next prev up; do ln -s /usr/share/xml/docbook/stylesheet/nwalsh/images/$$x.gif output-html/images/; done +XMLSOURCES=aptitude.xml manpage.xml - touch doc-html-stamp +IMAGES=$(wildcard $(srcdir)/images/*.png) images/safety-cost-level-diagram.png diff --git a/doc/fr/fixman b/doc/fr/fixman index ff13824c..2c895f6a 100755 --- a/doc/fr/fixman +++ b/doc/fr/fixman @@ -11,10 +11,8 @@ sed -i 's/search motifs/\\fBsearch\\fR motifs/' $MANPAGE sed -i 's/\\fBaptitude\\fR help/\\fBaptitude\\fR \\fBhelp\\fR/' $MANPAGE sed -i 's/^\.SH NAME$/.SH NOM/' $MANPAGE -head -n-2 $MANPAGE > ${MANPAGE}.tmp +cp $MANPAGE ${MANPAGE}.tmp cat ${MANPAGE}.tmp - >$MANPAGE < jusqu'en 2004. Cette page est depuis maintenue par Olivier Trichet . EOF +rm ${MANPAGE}.tmp diff --git a/doc/it/Makefile.am b/doc/it/Makefile.am index 7bd69384..38d2fa5f 100644 --- a/doc/it/Makefile.am +++ b/doc/it/Makefile.am @@ -1,80 +1,12 @@ # automake doesn't play nicely with DocBook :( -SUBDIRS=images +include $(top_srcdir)/doc/common.mk +include $(top_srcdir)/doc/po4a.mk +SUBDIRS=images EXTRA_DIST= LANGCODE=it -MANPAGE=aptitude.$(LANGCODE).8 -# How much of the manual is actually translated. -PERCENT_TRANSLATED=80 -MANPAGE_PERCENT_TRANSLATED=80 - -IMAGES=$(wildcard $(srcdir)/images/*.png) - -HTML2TEXT=$(srcdir)/../html-to-text - -## Put documentation in /usr/share/doc/aptitude (by default) -#docdir=$(datadir)/doc/$(PACKAGE) - -localemandir=$(mandir)/$(LANGCODE) - -# Automake automagically distributes README without asking -README=README.$(LANGCODE) - -if USE_PO4A -all-local: doc-stamp -else -all-local: -endif - -clean-local: - -rm -fr output-html/ output-txt/ output-man/ - -rm -f doc-stamp doc-css-stamp doc-html-stamp doc-txt-stamp doc-man-stamp - -rm -fr $(MANPAGE) $(README) *.tmp - -rm -fr aptitude.xml manpage.xml - -install-data-hook: - $(mkinstalldirs) $(DESTDIR)$(localemandir)/man8 - $(INSTALL_DATA) $(MANPAGE) $(DESTDIR)$(localemandir)/man8/aptitude.8 - $(mkinstalldirs) $(DESTDIR)$(docdir)/html/$(LANGCODE)/images - $(INSTALL_DATA) output-html/*.html output-html/*.css $(DESTDIR)$(docdir)/html/$(LANGCODE) - $(INSTALL_DATA) output-html/images/* $(DESTDIR)$(docdir)/html/$(LANGCODE)/images - - $(mkinstalldirs) $(DESTDIR)$(pkgdatadir) - $(INSTALL_DATA) README.$(LANGCODE) $(DESTDIR)$(pkgdatadir)/README.$(LANGCODE) - -doc-stamp: doc-html-stamp doc-css-stamp $(README) $(MANPAGE) - touch doc-stamp - -aptitude.xml: $(srcdir)/../en/aptitude.xml $(srcdir)/../po4a/po/$(LANGCODE).po - po4a-translate -k $(PERCENT_TRANSLATED) -M utf-8 -f docbook -m $(srcdir)/../en/aptitude.xml -p $(srcdir)/../po4a/po/$(LANGCODE).po -l aptitude.xml - -manpage.xml: $(srcdir)/../en/manpage.xml $(srcdir)/../po4a/po/$(LANGCODE).po - po4a-translate -k $(MANPAGE_PERCENT_TRANSLATED) -M utf-8 -f docbook -m $(srcdir)/../en/manpage.xml -p $(srcdir)/../po4a/po/$(LANGCODE).po -l manpage.xml - -$(MANPAGE): aptitude.xml manpage.xml $(srcdir)/../aptitude-man.xsl - -rm -fr output-man - xsltproc -o output-man/aptitude.8 $(srcdir)/../aptitude-man.xsl aptitude.xml - mv output-man/aptitude.8 $(MANPAGE) - -$(README): aptitude.xml manpage.xml $(srcdir)/../aptitude-txt.xsl $(srcdir)/../aptitude-common.xsl - -rm -fr output-txt/ - xsltproc -o output-txt/index.html $(srcdir)/../aptitude-txt.xsl aptitude.xml - $(HTML2TEXT) output-txt/index.html > $(README) - -doc-css-stamp: doc-html-stamp $(srcdir)/../aptitude.css - rm -f output-html/aptitude.css - cp $(srcdir)/../aptitude.css output-html/ - touch doc-css-stamp - -doc-html-stamp: aptitude.xml manpage.xml $(srcdir)/../aptitude-html.xsl $(srcdir)/../aptitude-common.xsl $(IMAGES) - -rm -fr output-html/ - - xsltproc -o output-html/ $(srcdir)/../aptitude-html.xsl aptitude.xml - mkdir output-html/images/ - ln -f $(srcdir)/images/*.png output-html/images/ - for x in caution important note tip warning; do ln -s /usr/share/xml/docbook/stylesheet/nwalsh/images/$$x.png output-html/images/; done - for x in home next prev up; do ln -s /usr/share/xml/docbook/stylesheet/nwalsh/images/$$x.gif output-html/images/; done +XMLSOURCES=aptitude.xml manpage.xml - touch doc-html-stamp +IMAGES=$(wildcard $(srcdir)/images/*.png) images/safety-cost-level-diagram.png diff --git a/doc/po4a.mk b/doc/po4a.mk new file mode 100644 index 00000000..30275b55 --- /dev/null +++ b/doc/po4a.mk @@ -0,0 +1,21 @@ +TRANSLATED=aptitude.xml manpage.xml + +PO4AFLAGS="--srcdir=$(top_srcdir)/doc" "--destdir=$(top_builddir)/doc" \ + "$(top_srcdir)/doc/po4a/po4a.cfg" + +clean-local: po4a-clean-local +po4a-clean-local: + -rm -fr $(TRANSLATED) + +%.xml %.svg: $(top_srcdir)/doc/po4a/po/$(LANGCODE).po + if [ -n "$(PO4A)" ]; then \ + targ="$(LANGCODE)/$@"; \ + $(PO4A) "--translate-only=$${targ}" $(PO4AFLAGS); \ + rm -f "$(top_srcdir)/doc/$${targ}" | true; \ + fi + +aptitude.xml: $(top_srcdir)/doc/en/aptitude.xml +manpage.xml: $(top_srcdir)/doc/en/manpage.xml +images/safety-cost-level-diagram.svg: $(top_srcdir)/doc/en/images/safety-cost-level-diagram.svg + +.PHONY: update-po diff --git a/doc/po4a/po/Makefile.am b/doc/po4a/po/Makefile.am index 2ae005b7..e06279f8 100644 --- a/doc/po4a/po/Makefile.am +++ b/doc/po4a/po/Makefile.am @@ -1,4 +1,4 @@ -EXTRA_DIST=de.po es.po fr.po it.po ja.po pl.po +EXTRA_DIST=aptitude.pot de.po es.po fr.po it.po ja.po pl.po clean-generic: rm -f *~ diff --git a/doc/po4a/po4a.cfg b/doc/po4a/po4a.cfg index 1d7fa77c..632a6410 100644 --- a/doc/po4a/po4a.cfg +++ b/doc/po4a/po4a.cfg @@ -1,15 +1,19 @@ -[po4a_paths] po4a/po/aptitude.pot de:po4a/po/de.po es:po4a/po/es.po fr:po4a/po/fr.po it:po4a/it/it.pl ja:po4a/po/ja.po pl:po4a/po/pl.po +[po_directory] po4a/po -[type: docbook] en/aptitude.xml de:de/aptitude.xml es:es/aptitude.xml fr:fr/aptitude.xml it:it/aptitude.xml ja:ja/aptitude.xml pl:pl/aptitude.xml +[po4a_alias:docbook] docbook opt:"-M utf-8 -o untranslated=" + +[po4a_alias:svg] xml opt:"-M utf-8 -k 0" + +[type: docbook] en/aptitude.xml \ + $lang:$lang/aptitude.xml \ + opt_fr:"-k 40" \ + opt_ja:"-k 30" [type: docbook] en/manpage.xml \ - de:de/manpage.xml \ - es:es/manpage.xml \ - fr:fr/manpage.xml \ - it:it/manpage.xml \ - ja:ja/manpage.xml \ - pl:pl/manpage.xml \ - add_de:po4a/add_de/addendum.1.de \ - add_fr:po4a/add_fr/addendum.1.fr \ - add_pl:po4a/add_pl/addendum.1.pl \ - opt:"-o tags=" + $lang:$lang/manpage.xml \ + opt_de:"-k 20" \ + opt_fr:"-k 30" \ + opt_ja:"-k 20" + +[type: svg] en/images/safety-cost-level-diagram.svg \ + $lang:$lang/images/safety-cost-level-diagram.svg -- cgit v1.2.3