5 # Bring in the default rules
 
   6 include ../buildlib/defaults.mak
 
   8 # Debian Doc SGML Documents
 
   9 SOURCE = $(wildcard *.sgml)
 
  10 DEBIANDOC_HTML_OPTIONS=-l en.UTF-8
 
  11 include $(DEBIANDOC_H)
 
  13 doc: manpages debiandoc
 
  15 examples/sources.list: ../vendor/current/sources.list
 
  16         ln -sf $(shell readlink -f $^) $@
 
  18 apt-vendor.ent: ../vendor/current/apt-vendor.ent
 
  19         ln -sf $(shell readlink -f $^) $@
 
  22 SOURCE = examples/apt.conf examples/sources.list examples/configure-index examples/apt-https-method-example.conf
 
  27 .PHONY: clean clean/subdirs veryclean veryclean/subdirs manpages/subdirs debiandoc/subdirs all binary doc stats
 
  29 clean: clean/subdirs clean/examples
 
  30 veryclean: veryclean/subdirs clean/examples
 
  31 manpages: apt-vendor.ent manpages/subdirs
 
  32 debiandoc: debiandoc/subdirs
 
  34 DOCUMENTATIONPO = $(patsubst %.po,%,$(notdir $(wildcard po/*.po)))
 
  35 DOCDIRLIST = $(addsuffix /makefile,$(DOCUMENTATIONPO))
 
  38 $(DOCDIRLIST) :: %/makefile : lang.makefile
 
  39         test -d $(dir $@) || mkdir $(dir $@)
 
  40         sed "s#@@LANG@@#$(subst /,,$(dir $@))#" $< > $@
 
  42 debiandoc/subdirs manpages/subdirs clean/subdirs veryclean/subdirs:
 
  43         for dir in en $(dir $(DOCDIRLIST)); do \
 
  44                 $(MAKE) -C $$dir $(patsubst %/subdirs,%,$@); \
 
  48         rm -f examples/sources.list
 
  52         for i in po/*.po; do echo -n "$$i: "; msgfmt --output-file=/dev/null --statistics $$i; done
 
  55 MANPAGEPOLIST = $(addprefix manpages-translation-,$(DOCUMENTATIONPO))
 
  56 DEBIANDOCPOLIST = $(addprefix debiandoc-translation-,$(DOCUMENTATIONPO))
 
  58 .PHONY: update-po po4a $(MANPAGEPOLIST) $(DEBIANDOCPOLIST) $(DOCDIRLIST)
 
  60 po4a: manpages/subdirs debiandoc/subdirs
 
  63         po4a --previous --no-backups --force --no-translations \
 
  64                 --package-name='$(PACKAGE)-doc' --package-version='$(PACKAGE_VERSION)' \
 
  65                 --msgid-bugs-address='$(PACKAGE_MAIL)' po4a.conf
 
  67 manpages/subdirs: $(MANPAGEPOLIST)
 
  68 $(MANPAGEPOLIST) :: manpages-translation-% : %/makefile po4a.conf
 
  69         # first line is for apt.7 (see Bug#696923)
 
  70         po4a --previous --no-backups --translate-only $(dir $<)apt.ent \
 
  71                 $(patsubst %,--translate-only $(dir $<)%,$(patsubst %.7,%.$(subst /,,$(dir $<)).7,$(wildcard *.7))) \
 
  72                 $(patsubst %,--translate-only $(dir $<)%,$(patsubst %.1.xml,%.$(subst /,,$(dir $<)).1.xml,$(wildcard *.1.xml))) \
 
  73                 $(patsubst %,--translate-only $(dir $<)%,$(patsubst %.2.xml,%.$(subst /,,$(dir $<)).2.xml,$(wildcard *.2.xml))) \
 
  74                 $(patsubst %,--translate-only $(dir $<)%,$(patsubst %.3.xml,%.$(subst /,,$(dir $<)).3.xml,$(wildcard *.3.xml))) \
 
  75                 $(patsubst %,--translate-only $(dir $<)%,$(patsubst %.4.xml,%.$(subst /,,$(dir $<)).4.xml,$(wildcard *.4.xml))) \
 
  76                 $(patsubst %,--translate-only $(dir $<)%,$(patsubst %.5.xml,%.$(subst /,,$(dir $<)).5.xml,$(wildcard *.5.xml))) \
 
  77                 $(patsubst %,--translate-only $(dir $<)%,$(patsubst %.6.xml,%.$(subst /,,$(dir $<)).6.xml,$(wildcard *.6.xml))) \
 
  78                 $(patsubst %,--translate-only $(dir $<)%,$(patsubst %.7.xml,%.$(subst /,,$(dir $<)).7.xml,$(wildcard *.7.xml))) \
 
  79                 $(patsubst %,--translate-only $(dir $<)%,$(patsubst %.8.xml,%.$(subst /,,$(dir $<)).8.xml,$(wildcard *.8.xml))) \
 
  80                 --package-name='$(PACKAGE)-doc' --package-version='$(PACKAGE_VERSION)' \
 
  81                 --msgid-bugs-address='$(PACKAGE_MAIL)' po4a.conf
 
  83 debiandoc/subdirs: $(DEBIANDOCPOLIST)
 
  84 $(DEBIANDOCPOLIST) :: debiandoc-translation-% : %/makefile po4a.conf
 
  85         po4a --previous --no-backups --translate-only $(dir $<)apt.ent \
 
  86                 $(patsubst %,--translate-only $(dir $<)%,$(patsubst %.sgml,%.$(subst /,,$(dir $<)).sgml,$(wildcard *.sgml))) \
 
  87                 --package-name='$(PACKAGE)-doc' --package-version='$(PACKAGE_VERSION)' \
 
  88                 --msgid-bugs-address='$(PACKAGE_MAIL)' po4a.conf
 
  92 DOXYGEN_SOURCES = $(shell find $(BASE)/apt-pkg -not -name .\\\#* -and \( -name \*.cc -or -name \*.h \) )
 
  97         rm -fr $(BUILD)/doc/doxygen
 
  98         rm -f $(BUILD)/doc/doxygen-stamp
 
 100 $(BUILD)/doc/doxygen-stamp: $(DOXYGEN_SOURCES) $(BUILD)/doc/Doxyfile
 
 101         rm -fr $(BUILD)/doc/doxygen
 
 102         mkdir $(BUILD)/doc/doxygen  # some versions seem to not create this directory #628799
 
 103         $(DOXYGEN) $(BUILD)/doc/Doxyfile
 
 104         touch $(BUILD)/doc/doxygen-stamp
 
 106 debiandoc: $(BUILD)/doc/doxygen-stamp