summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorDaniel Hartwig <mandyke@gmail.com>2012-06-01 21:47:02 +0800
committerDaniel Hartwig <mandyke@gmail.com>2012-06-01 21:47:02 +0800
commite8350caacbcaef6efbba8a9dea32e2c25c5b5689 (patch)
tree1ebe510a19876fda031f962f4bae96712e139456 /doc
parent1d9d2bd8d8dffaadf180800f5c13945aa16e0958 (diff)
downloadaptitude-e8350caacbcaef6efbba8a9dea32e2c25c5b5689.tar.gz
Update to the doc buildlib; all translations ported
All doc translations now use the new buildlib rule files which is cleaner and much easier to maintain. This involves many changes and a general cleanup. Some of the more noticable changes: * doc: - html docs no longer install to $docdir/html, but respect the htmldir option of configure (which defaults to $docdir) - build is more parallel * buildlib/doc.mk: - Standard makefile rules for documentation * buildlib/docbook.mk: - Makefile rules for targets from docbook source * buildlib/po4a.mk: - Makefile rules for targets from po4a translations * doc/Makefile.am, doc/??/Makefile.am: - rename LANGCODE to LC - update to use buildlib files; most of these files are now very short * configure.ac: - suppress portability warnings as we require GNU make - include bugreport address - check for tools used to generate the documentation: po4a, xsltproc, fop, rsvg-convert
Diffstat (limited to 'doc')
-rw-r--r--doc/Makefile.am22
-rw-r--r--doc/common.mk68
-rw-r--r--doc/cs/Makefile.am70
-rw-r--r--doc/de/Makefile.am79
-rw-r--r--doc/en/Makefile.am84
-rw-r--r--doc/es/Makefile.am24
-rw-r--r--doc/fi/Makefile.am70
-rwxr-xr-xdoc/fi/fixman2
-rw-r--r--doc/fr/Makefile.am22
-rwxr-xr-xdoc/fr/fixman2
-rw-r--r--doc/it/Makefile.am23
-rw-r--r--doc/ja/Makefile.am98
-rw-r--r--doc/pl/Makefile.am81
-rw-r--r--doc/pl/fixman2
-rw-r--r--doc/po4a.mk21
-rw-r--r--doc/po4a/Makefile.am2
-rw-r--r--doc/po4a/TRANSLATED3
-rw-r--r--doc/po4a/po4a.cfg7
18 files changed, 129 insertions, 551 deletions
diff --git a/doc/Makefile.am b/doc/Makefile.am
index e4644af2..3f67de3c 100644
--- a/doc/Makefile.am
+++ b/doc/Makefile.am
@@ -2,17 +2,21 @@ 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 html-to-text
-PO4AFLAGS="--srcdir=$(top_srcdir)/doc" "--destdir=$(top_builddir)/doc" \
- "$(top_srcdir)/doc/po4a/po4a.cfg"
+PO4AFLAGS = --srcdir=$(top_srcdir)/doc --destdir=$(top_builddir)/doc \
+ --package-name='$(PACKAGE)' --package-version='$(PACKAGE_VERSION)' \
+ --msgid-bugs-address='$(PACKAGE_BUGREPORT)' \
+ $(top_srcdir)/doc/po4a/po4a.cfg
-dist distdir: update-po
+if HAVE_PO4A
+
+dist: update-po
update-po:
- if [ -n "$(PO4A)" ]; then \
- $(PO4A) \
- --no-translations \
- "--package-name=$(PACKAGE)" "--package-version=$(VERSION)" \
- $(PO4AFLAGS); \
- fi
+ $(PO4A) --no-backups --force --no-translations $(PO4AFLAGS)
+
+po4a:
+ $(PO4A) --no-backups $(PO4AFLAGS)
+
+endif
.PHONY: update-po
diff --git a/doc/common.mk b/doc/common.mk
deleted file mode 100644
index 716b6ecb..00000000
--- a/doc/common.mk
+++ /dev/null
@@ -1,68 +0,0 @@
-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)
-
-pkgdata_DATA=$(README)
-
-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
-
-$(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_encoding) > $(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/cs/Makefile.am b/doc/cs/Makefile.am
index 7a64c4f0..104fc19b 100644
--- a/doc/cs/Makefile.am
+++ b/doc/cs/Makefile.am
@@ -1,67 +1,19 @@
-# automake doesn't play nicely with DocBook :(
+SUBDIRS = images
+EXTRA_DIST = aptitude.xml
-SUBDIRS=images
+LC = cs
-EXTRA_DIST=aptitude.xml
+include $(top_srcdir)/buildlib/doc.mk
-LANGCODE=cs
+README = README.cs
+README_encoding = utf-8
-# Put documentation in /usr/share/doc/aptitude (by default)
-docdir=$(datadir)/doc/$(PACKAGE)
-htmldir=$(docdir)/html/$(LANGCODE)
+IMAGES := $(wildcard $(srcdir)/images/*.png)
-localemandir=$(mandir)/$(LANGCODE)
+DOCBOOK_XML = aptitude.xml
+DOCBOOK_TARGETS = docbook-man docbook-html docbook-readme
-README=README.$(LANGCODE)
-MANPAGE=aptitude.$(LANGCODE).8
+include $(top_srcdir)/buildlib/docbook.mk
-HTML2TEXT=$(srcdir)/../html-to-text
+all-local: $(DOCBOOK_TARGETS)
-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)
-
-pkgdata_DATA=$(README)
-
-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
-
-doc-stamp: doc-html-stamp doc-css-stamp $(README) $(MANPAGE)
- touch doc-stamp
-
-$(MANPAGE): aptitude.xml $(srcdir)/../aptitude-man.xsl
- -rm -fr output-man
- xsltproc -o output-man/aptitude.8 $(srcdir)/../aptitude-man.xsl $(srcdir)/aptitude.xml
- mv output-man/aptitude.8 $(MANPAGE)
-
-$(README): aptitude.xml $(srcdir)/../aptitude-txt.xsl $(srcdir)/../aptitude-common.xsl
- -rm -fr output-txt/
- xsltproc -o output-txt/index.html $(srcdir)/../aptitude-txt.xsl $(srcdir)/aptitude.xml
- $(HTML2TEXT) output-txt/index.html utf-8 > $(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 ../aptitude-html.xsl ../aptitude-common.xsl $(IMAGES)
- -rm -fr output-html/
-
- xsltproc -o output-html/ $(srcdir)/../aptitude-html.xsl $(srcdir)/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/de/Makefile.am b/doc/de/Makefile.am
index 5494f2da..e5ccf10d 100644
--- a/doc/de/Makefile.am
+++ b/doc/de/Makefile.am
@@ -1,76 +1,15 @@
-# automake doesn't play nicely with DocBook :(
+SUBDIRS =
+EXTRA_DIST =
-# no full manual yet
-SUBDIRS=
-#SUBDIRS=images
+LC = de
-LANGCODE=de
-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
+PO4A_TRANSLATED = aptitude.xml manpage.xml
-# Put documentation in /usr/share/doc/aptitude (by default)
-docdir=$(datadir)/doc/$(PACKAGE)
-localemandir=$(mandir)/$(LANGCODE)
-htmldir=$(docdir)/html/$(LANGCODE)
+include $(top_srcdir)/buildlib/doc.mk
+include $(top_srcdir)/buildlib/po4a.mk
-HTML2TEXT=$(srcdir)/../html-to-text
+DOCBOOK_TARGETS = docbook-man
-IMAGES = $(wildcard $(srcdir)/images/*.png)
+include $(top_srcdir)/buildlib/docbook.mk
-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) aptitude.8 $(README) *.tmp
- -rm -fr aptitude.xml manpage.xml
-
-install-data-hook:
- $(mkinstalldirs) $(DESTDIR)$(localemandir)/man8
- $(INSTALL_DATA) $(MANPAGE) $(DESTDIR)$(localemandir)/man8/aptitude.8
-
-# $(mkinstalldirs) $(htmldir)/images
-# $(INSTALL_DATA) output-html/*.html output-html/*.css $(htmldir)
-# $(INSTALL_DATA) output-html/images/* $(htmldir)/images
-# $(INSTALL_DATA) $(srcdir)/$(README) $(DESTDIR)$(pkgdatadir)/$(README)
-
-#doc-stamp: doc-html-stamp doc-css-stamp $(README) $(MANPAGE)
-doc-stamp: $(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 utf-8 > $(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/
- 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
+all-local: $(DOCBOOK_TARGETS)
diff --git a/doc/en/Makefile.am b/doc/en/Makefile.am
index b48e28aa..fba07830 100644
--- a/doc/en/Makefile.am
+++ b/doc/en/Makefile.am
@@ -1,81 +1,17 @@
-# automake doesn't play nicely with DocBook :(
+SUBDIRS = images
+EXTRA_DIST = aptitude.xml manpage.xml
-SUBDIRS=images
+LC = en
-EXTRA_DIST=aptitude.xml manpage.xml
+include $(top_srcdir)/buildlib/doc.mk
-# Put documentation in /usr/share/doc/aptitude (by default)
-docdir=$(datadir)/doc/$(PACKAGE)
+README = README.en
+README_encoding = iso-8859-1
-# Automake automagically distributes README without asking..
-README=README.en
+IMAGES := $(wildcard $(srcdir)/images/*.png) images/safety-cost-level-diagram.svg
-HTML2TEXT=$(srcdir)/../html-to-text
+DOCBOOK_TARGETS = docbook-man docbook-html docbook-readme
-IMAGES = $(wildcard $(srcdir)/images/*.png)
+include $(top_srcdir)/buildlib/docbook.mk
-man_MANS=aptitude.8 aptitude-create-state-bundle.1 aptitude-run-state-bundle.1
-
-all-local: doc-stamp
-
-clean-local:
- -rm -fr output-fo/ output-html/ output-txt/ output-man/
- -rm -f doc-stamp doc-css-stamp doc-fo-stamp doc-html-stamp doc-txt-stamp man-stamp
- -rm -fr aptitude.8 aptitude-create-state-bundle.1 aptitude-run-state-bundle.1
- -rm -fr $(README)
-
-install-data-hook:
- $(mkinstalldirs) $(DESTDIR)$(docdir)/html/en/images
- $(INSTALL_DATA) output-html/*.html output-html/*.css $(DESTDIR)$(docdir)/html/en
- $(INSTALL_DATA) output-html/images/* $(DESTDIR)$(docdir)/html/en/images
-
- $(mkinstalldirs) $(DESTDIR)$(pkgdatadir)
- $(INSTALL_DATA) $(README) $(DESTDIR)$(pkgdatadir)/README
-
-doc-stamp: doc-html-stamp doc-css-stamp $(README) man-stamp
- touch doc-stamp
-
-fo: doc-fo-stamp
-
-man-stamp: $(srcdir)/aptitude.xml $(srcdir)/manpage.xml $(srcdir)/../aptitude-man.xsl
- -rm -fr output-man
- xsltproc -o output-man/ $(srcdir)/../aptitude-man.xsl $(srcdir)/aptitude.xml
- for x in $(man_MANS); do mv output-man/$$x .; done
- touch man-stamp
-
-aptitude.8 aptitude-create-state-bundle.1 aptitude-run-state-bundle.1: man-stamp
-
-$(README): $(srcdir)/aptitude.xml $(srcdir)/manpage.xml $(srcdir)/../aptitude-txt.xsl $(srcdir)/../aptitude-common.xsl
- -rm -fr output-txt/
- xsltproc -o output-txt/index.html $(srcdir)/../aptitude-txt.xsl $(srcdir)/aptitude.xml
- $(HTML2TEXT) output-txt/index.html iso-8859-1 > $(README)
-
-doc-fo-stamp: $(srcdir)/aptitude.xml $(srcdir)/manpage.xml $(srcdir)/../aptitude-fo.xsl $(srcdir)/../aptitude-common.xsl $(IMAGES)
- -rm -fr output-fo/
- xsltproc -o output-fo/aptitude.fo $(srcdir)/../aptitude-fo.xsl $(srcdir)/aptitude.xml
-
- mkdir output-fo/images/
- ln -f $(srcdir)/images/* output-fo/images/
- for x in caution draft important note tip warning; do ln -s /usr/share/xml/docbook/stylesheet/nwalsh/images/$$x.png output-fo/images/; done
- touch doc-fo-stamp
-
-doc-pdf: doc-fo-stamp
- fop output-fo/aptitude.fo -pdf output-fo/aptitude.pdf
-
-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 $(srcdir)/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 -x 1.5 -y 1.5 -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
-
- touch doc-html-stamp
+all-local: docbook-stamp
diff --git a/doc/es/Makefile.am b/doc/es/Makefile.am
index 4633a661..cee46d29 100644
--- a/doc/es/Makefile.am
+++ b/doc/es/Makefile.am
@@ -1,14 +1,20 @@
-# automake doesn't play nicely with DocBook :(
+SUBDIRS = images
+EXTRA_DIST =
-include $(top_srcdir)/doc/common.mk
-include $(top_srcdir)/doc/po4a.mk
+LC = es
-SUBDIRS=images
-EXTRA_DIST=
-LANGCODE=es
+include $(top_srcdir)/buildlib/doc.mk
+include $(top_srcdir)/buildlib/po4a.mk
-README_encoding=utf-8
+README = README.es
+README_encoding = utf-8
-XMLSOURCES=aptitude.xml manpage.xml
+IMAGES := $(wildcard $(srcdir)/images/*.png) $(PO4A_IMAGES)
+
+DOCBOOK_XML = aptitude.xml manpage.xml
+DOCBOOK_TARGETS = docbook-man docbook-html docbook-readme
+
+include $(top_srcdir)/buildlib/docbook.mk
+
+all-local: $(DOCBOOK_TARGETS)
-IMAGES=$(wildcard $(srcdir)/images/*.png) images/safety-cost-level-diagram.png
diff --git a/doc/fi/Makefile.am b/doc/fi/Makefile.am
index 4202f2fa..0b0de2ce 100644
--- a/doc/fi/Makefile.am
+++ b/doc/fi/Makefile.am
@@ -1,67 +1,21 @@
-# automake doesn't play nicely with DocBook :(
+SUBDIRS = images
+EXTRA_DIST = aptitude.xml manpage.xml fixman
-SUBDIRS=images
+LC = fi
-EXTRA_DIST=aptitude.xml manpage.xml fixman
-LANGCODE=fi
-MANPAGE=aptitude.$(LANGCODE).8
+include $(top_srcdir)/buildlib/doc.mk
-# Put documentation in /usr/share/doc/aptitude (by default)
-docdir=$(datadir)/doc/$(PACKAGE)
+README = README.fi
+README_encoding = utf-8
-localemandir=$(mandir)/$(LANGCODE)
+IMAGES := $(wildcard $(srcdir)/images/*.png)
-# Automake automagically distributes README without asking..
-README=README.$(LANGCODE)
+DOCBOOK_XML = aptitude.xml manpage.xml
+DOCBOOK_TARGETS = docbook-man docbook-html docbook-readme
-HTML2TEXT=$(srcdir)/../html-to-text
+DOCBOOK_MANS = aptitude.8
-IMAGES = $(wildcard $(srcdir)/images/*.png)
+include $(top_srcdir)/buildlib/docbook.mk
-pkgdata_DATA=$(README)
+all-local: $(DOCBOOK_TARGETS)
-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
-
-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
-
-doc-stamp: doc-html-stamp doc-css-stamp $(README) $(MANPAGE)
- touch doc-stamp
-
-$(MANPAGE): aptitude.xml manpage.xml $(srcdir)/../aptitude-man.xsl
- -rm -fr output-man
- xsltproc -o output-man/aptitude.8 $(srcdir)/../aptitude-man.xsl $(srcdir)/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 $(srcdir)/aptitude.xml
- $(HTML2TEXT) output-txt/index.html utf-8 > $(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 $(srcdir)/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/fi/fixman b/doc/fi/fixman
index b28603b4..891c2e50 100755
--- a/doc/fi/fixman
+++ b/doc/fi/fixman
@@ -1,7 +1,7 @@
#!/bin/bash
# this file basically copied from fixquotes, adapting to Finnish
-MANPAGE=aptitude.fi.8
+MANPAGE="$1"
# Finnish uses the same kind of quotes on both sides, in TeX these are
# '', but it's much better to use the " character
diff --git a/doc/fr/Makefile.am b/doc/fr/Makefile.am
index b551b834..d628920b 100644
--- a/doc/fr/Makefile.am
+++ b/doc/fr/Makefile.am
@@ -1,14 +1,18 @@
-# automake doesn't play nicely with DocBook :(
+SUBDIRS = images
+EXTRA_DIST = fixman
-include $(top_srcdir)/doc/common.mk
-include $(top_srcdir)/doc/po4a.mk
+LC = fr
-SUBDIRS=images
-EXTRA_DIST=fixman
-LANGCODE=fr
+include $(top_srcdir)/buildlib/doc.mk
+include $(top_srcdir)/buildlib/po4a.mk
-README_encoding=utf-8
+README = README.fr
+README_encoding = utf-8
-XMLSOURCES=aptitude.xml manpage.xml
+IMAGES := $(wildcard $(srcdir)/images/*.png) $(PO4A_IMAGES)
-IMAGES=$(wildcard $(srcdir)/images/*.png) images/safety-cost-level-diagram.png
+DOCBOOK_TARGETS = docbook-html docbook-man docbook-readme
+
+include $(top_srcdir)/buildlib/docbook.mk
+
+all-local: $(DOCBOOK_TARGETS)
diff --git a/doc/fr/fixman b/doc/fr/fixman
index 2c895f6a..2a17ba7b 100755
--- a/doc/fr/fixman
+++ b/doc/fr/fixman
@@ -2,7 +2,7 @@
# this file basically copied from fixquotes (German translation)
# and fixman (Finnish translation)
-MANPAGE=aptitude.fr.8
+MANPAGE="$1"
# Guillement français pour la traduction des <quote>...</quote>
sed -i "s/''/\\ »/g;"'s/``/«\\ /g' $MANPAGE
diff --git a/doc/it/Makefile.am b/doc/it/Makefile.am
index 86408c5f..97e64ab8 100644
--- a/doc/it/Makefile.am
+++ b/doc/it/Makefile.am
@@ -1,14 +1,19 @@
-# automake doesn't play nicely with DocBook :(
+SUBDIRS = images
+EXTRA_DIST =
-include $(top_srcdir)/doc/common.mk
-include $(top_srcdir)/doc/po4a.mk
+LC = it
-SUBDIRS=images
-EXTRA_DIST=
-LANGCODE=it
+include $(top_srcdir)/buildlib/doc.mk
+include $(top_srcdir)/buildlib/po4a.mk
-README_encoding=utf-8
+README = README.it
+README_encoding = utf-8
-XMLSOURCES=aptitude.xml manpage.xml
+IMAGES := $(wildcard $(srcdir)/images/*.png) $(PO4A_IMAGES)
-IMAGES=$(wildcard $(srcdir)/images/*.png) images/safety-cost-level-diagram.png
+DOCBOOK_XML = aptitude.xml manpage.xml
+DOCBOOK_TARGETS = docbook-html docbook-man docbook-readme
+
+include $(top_srcdir)/buildlib/docbook.mk
+
+all-local: $(DOCBOOK_TARGETS)
diff --git a/doc/ja/Makefile.am b/doc/ja/Makefile.am
index 43a63897..cb17f124 100644
--- a/doc/ja/Makefile.am
+++ b/doc/ja/Makefile.am
@@ -1,93 +1,21 @@
-# automake doesn't play nicely with DocBook :(
+SUBDIRS = images
+EXTRA_DIST = aptitude-html-ja.xsl
-SUBDIRS=images
-EXTRA_DIST=aptitude-html-ja.xsl
+LC = ja
-LANGCODE=ja
-MANPAGE=aptitude.$(LANGCODE).8
-# Automake automagically distributes README without asking..
-README=README.$(LANGCODE)
-XMLSOURCES=aptitude.xml manpage.xml
-PERCENT_TRANSLATED=30
-MANPAGE_PERCENT_TRANSLATED=25
+include $(top_srcdir)/buildlib/doc.mk
+include $(top_srcdir)/buildlib/po4a.mk
-HTML2TEXT=$(srcdir)/../html-to-text
+README = README.ja
+README_encoding = utf-8
-# Put documentation in /usr/share/doc/aptitude (by default)
-docdir=$(datadir)/doc/$(PACKAGE)
-localemandir=$(mandir)/$(LANGCODE)
-htmldir=$(DESTDIR)$(docdir)/html/$(LANGCODE)
+IMAGES := $(wildcard $(srcdir)/images/*.png) $(PO4A_IMAGES)
-IMAGES = $(wildcard $(srcdir)/images/*.png)
+DOCBOOK_HTML_XSL = aptitude-html-ja.xsl
-pkgdata_DATA=$(README)
+DOCBOOK_MANS = aptitude.8
+DOCBOOK_TARGETS = docbook-html docbook-man docbook-readme
-if USE_PO4A
-all-local: doc-stamp
-else
-all-local:
-endif
+include $(top_srcdir)/buildlib/docbook.mk
-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)
- -rm -f $(XMLSOURCES)
-
-install-data-hook:
- $(mkinstalldirs) $(DESTDIR)$(localemandir)/man8
- $(INSTALL_DATA) $(MANPAGE) $(DESTDIR)$(localemandir)/man8/aptitude.8
-
- $(mkinstalldirs) $(htmldir)/images
- $(INSTALL_DATA) output-html/*.html output-html/*.css $(htmldir)
- $(INSTALL_DATA) output-html/images/* $(htmldir)/images
-
-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 -M utf-8 -f docbook -m $(srcdir)/../en/aptitude.xml -p $(srcdir)/../po4a/po/$(LANGCODE).po -l aptitude.xml -k $(PERCENT_TRANSLATED)
-
-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
-
-db2latex: doc-db2latex-stamp
-
-$(MANPAGE): $(XMLSOURCES) $(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): $(XMLSOURCES) $(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 utf-8 > $(README)
-
-doc-db2latex-stamp: output-db2latex/aptitude.tex $(IMAGES)
- ln -s ../images output-db2latex/images
-# Run pdflatex 3 times just to be extra sure that it converges.
- cd output-db2latex && pdflatex -interaction nonstopmode aptitude.tex && pdflatex -interaction nonstopmode aptitude.tex && pdflatex -interaction nonstopmode aptitude.tex
- touch doc-db2latex-stamp
-
-output-db2latex/aptitude.tex: $(XMLSOURCES) $(srcdir)/../aptitude-db2latex.xsl $(srcdir)/../aptitude-common.xsl
- -rm -fr output-db2latex
- mkdir output-db2latex
- xsltproc -o output-db2latex/aptitude.tex $(srcdir)/../aptitude-db2latex.xsl aptitude.xml
-
-
-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) aptitude-html-$(LANGCODE).xsl $(srcdir)/../aptitude-common.xsl $(IMAGES)
- -rm -fr output-html/
-
- xsltproc -o output-html/ $(srcdir)/aptitude-html-$(LANGCODE).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
+all-local: $(DOCBOOK_TARGETS)
diff --git a/doc/pl/Makefile.am b/doc/pl/Makefile.am
index 2ba6457a..bbd1e3fc 100644
--- a/doc/pl/Makefile.am
+++ b/doc/pl/Makefile.am
@@ -1,77 +1,16 @@
-# automake doesn't play nicely with DocBook :(
+SUBDIRS =
+EXTRA_DIST = fixman
-# no full manual yet
-SUBDIRS=
-#SUBDIRS=images
-EXTRA_DIST=fixman
-LANGCODE=pl
-MANPAGE=aptitude.$(LANGCODE).8
-# How much of the manual should actually at least be translated.
-PERCENT_TRANSLATED=0
-MANPAGE_PERCENT_TRANSLATED=0
-README=README.$(LANGCODE)
-XMLSOURCES=aptitude.xml manpage.xml $(srcdir)/../aptitude-common.xsl
+LC = pl
-# Put documentation in /usr/share/doc/aptitude (by default)
-docdir=$(datadir)/doc/$(PACKAGE)
-localemandir=$(mandir)/$(LANGCODE)
-htmldir=$(docdir)/html/$(LANGCODE)
+PO4A_TRANSLATED = aptitude.xml manpage.xml
-HTML2TEXT=$(srcdir)/../html-to-text
+include $(top_srcdir)/buildlib/doc.mk
+include $(top_srcdir)/buildlib/po4a.mk
-IMAGES = $(wildcard $(srcdir)/images/*.png)
+DOCBOOK_MANS = aptitude.8
+DOCBOOK_TARGETS = docbook-man
-all-local: doc-stamp
+include $(top_srcdir)/buildlib/docbook.mk
-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) aptitude.8 $(README) *.tmp
- -rm -fr aptitude.xml manpage.xml
-
-install-data-hook:
- $(mkinstalldirs) $(DESTDIR)$(localemandir)/man8
- $(INSTALL_DATA) $(MANPAGE) $(DESTDIR)$(localemandir)/man8/aptitude.8
-
-# $(mkinstalldirs) $(htmldir)/images
-# $(INSTALL_DATA) output-html/*.html output-html/*.css $(htmldir)
-# $(INSTALL_DATA) output-html/images/* $(htmldir)/images
-# $(INSTALL_DATA) $(srcdir)/$(README) $(DESTDIR)$(pkgdatadir)/$(README)
-
-#doc-stamp: doc-html-stamp doc-css-stamp $(README) $(MANPAGE)
-doc-stamp: $(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)
- /bin/bash $(srcdir)/fixman
-
-$(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/
- 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
+all-local: $(DOCBOOK_TARGETS)
diff --git a/doc/pl/fixman b/doc/pl/fixman
index eff278b1..9b0c8896 100644
--- a/doc/pl/fixman
+++ b/doc/pl/fixman
@@ -1,5 +1,5 @@
#!/bin/bash
-MANPAGE=aptitude.pl.8
+MANPAGE="$1"
#Polish left quotation mark
sed -i -e 's_(lq_[Bq]_g' $MANPAGE
diff --git a/doc/po4a.mk b/doc/po4a.mk
deleted file mode 100644
index 30275b55..00000000
--- a/doc/po4a.mk
+++ /dev/null
@@ -1,21 +0,0 @@
-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/Makefile.am b/doc/po4a/Makefile.am
index 49c64f77..e85c380e 100644
--- a/doc/po4a/Makefile.am
+++ b/doc/po4a/Makefile.am
@@ -1,3 +1,3 @@
-EXTRA_DIST=po4a.cfg
+EXTRA_DIST=po4a.cfg TRANSLATED
SUBDIRS=po add_de add_es add_fr add_pl
diff --git a/doc/po4a/TRANSLATED b/doc/po4a/TRANSLATED
new file mode 100644
index 00000000..0e648929
--- /dev/null
+++ b/doc/po4a/TRANSLATED
@@ -0,0 +1,3 @@
+aptitude.xml
+manpage.xml
+images/safety-cost-level-diagram.svg
diff --git a/doc/po4a/po4a.cfg b/doc/po4a/po4a.cfg
index 632a6410..dd5da8d6 100644
--- a/doc/po4a/po4a.cfg
+++ b/doc/po4a/po4a.cfg
@@ -6,14 +6,11 @@
[type: docbook] en/aptitude.xml \
$lang:$lang/aptitude.xml \
- opt_fr:"-k 40" \
- opt_ja:"-k 30"
+ opt:"-k 0"
[type: docbook] en/manpage.xml \
$lang:$lang/manpage.xml \
- opt_de:"-k 20" \
- opt_fr:"-k 30" \
- opt_ja:"-k 20"
+ opt:"-k 0"
[type: svg] en/images/safety-cost-level-diagram.svg \
$lang:$lang/images/safety-cost-level-diagram.svg