summaryrefslogtreecommitdiff
path: root/doc/it
diff options
context:
space:
mode:
authorDaniel Hartwig <mandyke@gmail.com>2012-05-30 11:57:09 +0800
committerDaniel Hartwig <mandyke@gmail.com>2012-05-30 11:57:09 +0800
commitc170cbc7081230155d0f41039f3b2267be5e4fe5 (patch)
tree7948d4a6c42f678fda818903e239fc8fe79b7e2a /doc/it
parentb4e2e2c590ab4ed1b52fee9c86f9e44473825901 (diff)
downloadaptitude-c170cbc7081230155d0f41039f3b2267be5e4fe5.tar.gz
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
Diffstat (limited to 'doc/it')
-rw-r--r--doc/it/Makefile.am78
1 files changed, 5 insertions, 73 deletions
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