From e8350caacbcaef6efbba8a9dea32e2c25c5b5689 Mon Sep 17 00:00:00 2001 From: Daniel Hartwig Date: Fri, 1 Jun 2012 21:47:02 +0800 Subject: 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 --- .gitignore | 3 + Makefile.am | 2 +- buildlib/Makefile.am | 1 + buildlib/doc.mk | 14 +++++ buildlib/docbook.mk | 167 +++++++++++++++++++++++++++++++++++++++++++++++++++ buildlib/po4a.mk | 23 +++++++ configure.ac | 20 +++--- doc/Makefile.am | 22 ++++--- doc/common.mk | 68 --------------------- doc/cs/Makefile.am | 70 ++++----------------- doc/de/Makefile.am | 79 +++--------------------- doc/en/Makefile.am | 84 +++----------------------- doc/es/Makefile.am | 24 +++++--- doc/fi/Makefile.am | 70 ++++----------------- doc/fi/fixman | 2 +- doc/fr/Makefile.am | 22 ++++--- doc/fr/fixman | 2 +- doc/it/Makefile.am | 23 ++++--- doc/ja/Makefile.am | 98 ++++-------------------------- doc/pl/Makefile.am | 81 +++---------------------- doc/pl/fixman | 2 +- doc/po4a.mk | 21 ------- doc/po4a/Makefile.am | 2 +- doc/po4a/TRANSLATED | 3 + doc/po4a/po4a.cfg | 7 +-- 25 files changed, 350 insertions(+), 560 deletions(-) create mode 100644 buildlib/Makefile.am create mode 100644 buildlib/doc.mk create mode 100644 buildlib/docbook.mk create mode 100644 buildlib/po4a.mk delete mode 100644 doc/common.mk delete mode 100644 doc/po4a.mk create mode 100644 doc/po4a/TRANSLATED diff --git a/.gitignore b/.gitignore index 27ddf375..7bdb4310 100644 --- a/.gitignore +++ b/.gitignore @@ -38,6 +38,9 @@ depcomp .deps/ +buildlib/Makefile +buildlib/Makefile.in + doc/Makefile doc/Makefile.in doc/cs/Makefile diff --git a/Makefile.am b/Makefile.am index 6796d843..c7a0e830 100644 --- a/Makefile.am +++ b/Makefile.am @@ -7,7 +7,7 @@ SRCDIRS=@SRCDIRS@ DOCDIRS=@DOCDIRS@ TESTDIRS=@TESTDIRS@ -SUBDIRS=$(SRCDIRS) $(DOCDIRS) m4 po $(TESTDIRS) +SUBDIRS=buildlib $(SRCDIRS) $(DOCDIRS) m4 po $(TESTDIRS) dist_bin_SCRIPTS = aptitude-create-state-bundle aptitude-run-state-bundle diff --git a/buildlib/Makefile.am b/buildlib/Makefile.am new file mode 100644 index 00000000..ffc97506 --- /dev/null +++ b/buildlib/Makefile.am @@ -0,0 +1 @@ +EXTRA_DIST = doc.mk docbook.mk po4a.mk diff --git a/buildlib/doc.mk b/buildlib/doc.mk new file mode 100644 index 00000000..ac8e8ab7 --- /dev/null +++ b/buildlib/doc.mk @@ -0,0 +1,14 @@ +# Standard makefile rules for documentation +# + +HTML2TEXT = $(top_srcdir)/doc/html-to-text + +mandir = $(if $(findstring en,$(LC)),@mandir@,@mandir@/$(LC)) +htmldir = @htmldir@/$(LC) +imagesdir = $(htmldir)/images + +man_MANS = +html_DATA = +images_DATA = +pkgdata_DATA = $(README) +pdf_DATA = $(aptitude.pdf) diff --git a/buildlib/docbook.mk b/buildlib/docbook.mk new file mode 100644 index 00000000..76d0378a --- /dev/null +++ b/buildlib/docbook.mk @@ -0,0 +1,167 @@ +# Makefile rules for targets from docbook source +# + +dbiftargets = $(if $(findstring $(1),$(DOCBOOK_TARGETS)),$(2)) + +DOCBOOK_IMAGES ?= $(patsubst %.svg,%.png,$(IMAGES)) + +DOCBOOK_XML ?= aptitude.xml manpage.xml +DOCBOOK_HTML_XSL ?= aptitude-html.xsl + +DOCBOOK_HTML ?= $(wildcard output-html/*.html) $(wildcard output-html/*.css) +DOCBOOK_HTML_IMAGES ?= $(wildcard output-html/images/*.png) $(wildcard output-html/images/*.gif) +DOCBOOK_MANS ?= $(call dbiftargets,docbook-man, \ + aptitude.8 aptitude-create-state-bundle.1 aptitude-run-state-bundle.1) + +docbook-stamp: $(DOCBOOK_TARGETS) + touch docbook-stamp + +docbook-man: docbook-man-stamp +docbook-html: docbook-html-stamp docbook-css-stamp docbook-html-images-stamp +docbook-readme: docbook-readme-stamp +docbook-pdf: docbook-pdf-stamp + +.PHONY: docbook-man docbook-html docbook-readme docbook-pdf +.PHONY: clean-local clean-docbookclean-docbook-readme +.PHONY: clean-docbook-man clean-docbook-fo clean-docbook-pdf +.PHONY: clean-docbook-html clean-docbook-css clean-docbook-html-images +.PHONY: install-data-docbook uninstall-docbook +.PHONY: install-docbook-html uninstall-docbook-html + +vpath %.xsl $(top_srcdir)/doc +vpath %.css $(top_srcdir)/doc + +DOCBOOK_INSTALL_CANDIDATES = docbook-html +DOCBOOK_INSTALL_TARGETS = $(filter $(DOCBOOK_INSTALL_CANDIDATES),$(DOCBOOK_TARGETS)) + +install-data-hook: install-data-docbook +install-data-docbook: $(addprefix install-, $(DOCBOOK_INSTALL_TARGETS)) + +uninstall-hook: uninstall-docbook +uninstall-docbook: $(addprefix uninstall-, $(DOCBOOK_INSTALL_TARGETS)) + +dbinstall = @list='$(1)'; test -n "$(2)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(2)'"; \ + $(MKDIR_P) "$(DESTDIR)$(2)" || exit 1; \ + fi; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(2)'"; \ + $(INSTALL_DATA) $$files "$(DESTDIR)$(2)" || exit $$?; \ + done + +dbuninstall = @list='$(1)'; test -n "$(2)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + dir='$(DESTDIR)$(2)'; $(am__uninstall_files_from_dir) + +man_MANS += $(DOCBOOK_MANS) + +install-docbook-html: docbook-html + @$(NORMAL_INSTALL) + $(call dbinstall,$(DOCBOOK_HTML),$(htmldir)) + $(call dbinstall,$(DOCBOOK_HTML_IMAGES),$(imagesdir)) +uninstall-docbook-html: + @$(NORMAL_UNINSTALL) + $(call dbuninstall,$(DOCBOOK_HTML),$(htmldir)) + $(call dbuninstall,$(DOCBOOK_HTML_IMAGES),$(imagesdir)) + +clean-local: clean-docbook +clean-docbook: $(addprefix clean-,$(DOCBOOK_TARGETS)) + -rm -f docbook-stamp +clean-docbook-man: + -rm -fr output-man/ docbook-man-stamp $(DOCBOOK_MANS) +clean-docbook-html: clean-docbook-css clean-docbook-html-images + -rm -fr output-html/ docbook-html-stamp +clean-docbook-css: + -rm -f output-html/aptitude.css docbook-css-stamp +clean-docbook-html-images: + -rm -f output-html/images/ docbook-html-images-stamp +clean-docbook-readme: + -rm -fr output-readme/ docbook-readme-stamp $(README) +clean-docbook-fo: + -rm -fr output-fo/ docbook-fo-stamp +clean-docbook-pdf: clean-docbook-fo + -rm -fr docbook-pdf-stamp $(aptitude.pdf) + +docbook-css-stamp: aptitude.css docbook-html-stamp + -rm -f output-html/aptitude.css + cp $< output-html/ + touch docbook-css-stamp + +docbook-html-images-stamp: $(DOCBOOK_IMAGES) docbook-html-stamp + mkdir output-html/images/ + cp -f $(filter-out docbook-html-stamp,$^) 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 docbook-html-images-stamp + +$(DOCBOOK_MANS): $(findstring docbook-man,$(DOCBOOK_TARGETS)) +$(README): $(findstring docbook-readme,$(DOCBOOK_TARGETS)) +$(aptitude.pdf): $(findstring docbook-pdf,$(DOCBOOK_TARGETS) + +if HAVE_RSVGCONVERT + +images/%.png: images/%.svg + $(RSVGCONVERT) -x 1.5 -y 1.5 -f png -o $@ $< + +endif + +if HAVE_XSLTPROC + +docbook-man-stamp: $(DOCBOOK_XML) aptitude-man.xsl aptitude-common.xsl + -rm -fr output-man/ + $(XSLTPROC) -o output-man/aptitude.8 $(filter %aptitude-man.xsl,$^) $< + ln -f $(addprefix output-man/,$(DOCBOOK_MANS)) . + @if [ -x "$(srcdir)/fixman" ]; then \ + for i in $(DOCBOOK_MANS); do \ + echo "$(srcdir)/fixman $$i"; \ + . $(srcdir)/fixman $$i; \ + done; \ + fi + touch docbook-man-stamp + +docbook-html-stamp: $(DOCBOOK_XML) $(DOCBOOK_HTML_XSL) aptitude-common.xsl + -rm -fr output-html/ + $(XSLTPROC) -o output-html/ $(filter %$(DOCBOOK_HTML_XSL),$^) $< + touch docbook-html-stamp + +docbook-readme-stamp: $(DOCBOOK_XML) aptitude-txt.xsl aptitude-common.xsl + -rm -fr output-readme/ $(README) + $(XSLTPROC) -o output-readme/index.html $(filter %aptitude-txt.xsl,$^) $< + @echo "$(HTML2TEXT) output-readme/index.html $(README_encoding) > $(README)"; \ + $(HTML2TEXT) output-readme/index.html $(README_encoding) > $(README) \ + || (rm -f $(README); exit 1) + touch docbook-readme-stamp + +docbook-fo-stamp: $(DOCBOOK_XML) aptitude-fo.xsl aptitude-common.xsl $(IMAGES) + -rm -fr output-fo/ + $(XSLTPROC) -o output-fo/aptitude.fo $(filter %aptitude-fo.xsl,$^) $< + + mkdir output-fo/images/ + ln -f $(srcdir)/images/*.png output-fo/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 + + touch docbook-fo-stamp + +endif + +if HAVE_FOP + +docbook-pdf-stamp: docbook-fo-stamp + $(FOP) output-fo/aptitude.fo -pdf $(aptitude.pdf) + touch docbook-pdf-stamp + +endif diff --git a/buildlib/po4a.mk b/buildlib/po4a.mk new file mode 100644 index 00000000..9b995580 --- /dev/null +++ b/buildlib/po4a.mk @@ -0,0 +1,23 @@ +# Makefile rules for targets from po4a translations +# + +PO4A_TRANSLATED ?= $(shell cat $(top_srcdir)/doc/po4a/TRANSLATED) +PO4A_IMAGES := $(filter images/%,$(PO4A_TRANSLATED)) + +PO4AFLAGS = --srcdir=$(top_srcdir)/doc --destdir=$(top_builddir)/doc \ + $(top_srcdir)/doc/po4a/po4a.cfg + +clean-local: clean-po4a + +clean-po4a: + -rm -fr $(PO4A_TRANSLATED) $(PO4A_IMAGES) + -rm -fr $(addprefix "$(srcdir)/",$(PO4A_IMAGES)) + +vpath %.po $(top_srcdir)/doc/po4a/po + +if HAVE_PO4A + +$(PO4A_TRANSLATED): $(LC).po $(top_srcdir)/doc/en/$@ + $(PO4A) --translate-only=$(LC)/$@ $(PO4AFLAGS) + +endif diff --git a/configure.ac b/configure.ac index 2fe1d2e2..1366f75d 100644 --- a/configure.ac +++ b/configure.ac @@ -1,7 +1,7 @@ dnl Process this file with autoconf to produce a configure script. -AC_INIT([aptitude], [0.6.8]) +AC_INIT([aptitude], [0.6.8], [aptitude-devel@lists.alioth.debian.org]) AC_CONFIG_SRCDIR([src/main.cc]) -AM_INIT_AUTOMAKE +AM_INIT_AUTOMAKE([-Wno-portability]) AM_CONFIG_HEADER(config.h) dnl Use C++ @@ -13,13 +13,16 @@ AM_GNU_GETTEXT([external]) dnl Checks for programs. AC_PROG_CXX AC_PROG_RANLIB -dnl Checks for programs. +dnl Checks for programs used to generate the documentation. AC_PATH_PROG(PO4A, po4a) -if test "x$PO4A" = "x" ; then - AM_CONDITIONAL(USE_PO4A, false) -else - AM_CONDITIONAL(USE_PO4A, true) -fi +AC_PATH_PROG(XSLTPROC, xsltproc) +AC_PATH_PROG(RSVGCONVERT, rsvg-convert) +AC_PATH_PROG(FOP, fop) + +AM_CONDITIONAL(HAVE_PO4A, [test "x$PO4A" != "x"]) +AM_CONDITIONAL(HAVE_XSLTPROC, [test "x$XSLTPROC" != "x"]) +AM_CONDITIONAL(HAVE_RSVGCONVERT, [test "x$RSVGCONVERT" != "x"]) +AM_CONDITIONAL(HAVE_FOP, [test "x$FOP" != "x"]) dnl C++ has const and inline!!! ac_cv_c_const=yes @@ -932,6 +935,7 @@ dnl AC_DEFINE_UNQUOTED(PKGDATADIR, "$PKGDATADIR", [The location in which the pro AC_CONFIG_FILES([ Doxyfile Makefile + buildlib/Makefile doc/Makefile doc/cs/Makefile doc/cs/images/Makefile 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 ... 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 -- cgit v1.2.3