4 SUBDIRS= $(dir $(wildcard */makefile))
6 # Bring in the default rules
7 include ../buildlib/defaults.mak
9 # Debian Doc SGML Documents
10 SOURCE = $(wildcard *.sgml)
11 DEBIANDOC_HTML_OPTIONS=-l en.UTF-8
12 include $(DEBIANDOC_H)
14 MANPAGEPO = $(patsubst %.po,%,$(notdir $(wildcard po/*.po)))
15 MANPAGEPOLIST = $(patsubst %,manpages-translation-%,$(MANPAGEPO))
19 # Do not use XMLTO, build the manpages directly with XSLTPROC
21 # generate a list of accepted man page translations
22 SOURCE = $(patsubst %.xml,%,$(wildcard *.?.xml))
23 INCLUDES = apt.ent apt-verbatim.ent
24 STYLESHEET=manpage-style.xsl
26 LOCAL := manpage-$(firstword $(SOURCE))
27 $(LOCAL)-LIST := $(SOURCE)
29 # Install generation hooks
30 manpages: $(MANPAGEPOLIST) $($(LOCAL)-LIST)
32 $($(LOCAL)-LIST) :: % : %.xml $(STYLESHEET) $(INCLUDES)
33 echo Creating man page $@
34 $(XSLTPROC) -o $@ $(STYLESHEET) $<
36 $(MANPAGEPOLIST) :: manpages-translation-% : %/makefile po4a
37 $(MAKE) -C $(dir $<) doc
39 .PHONY: manpages dirs-manpage-subdirs $(MANPAGEPOLIST)
40 dirs: dirs-manpage-subdirs
42 for i in $(MANPAGEPO); do \
43 test -d $$i || mkdir $$i; \
44 test -f $$i/makefile || sed "s#@@LANG@@#$$i#" lang.makefile > $$i/makefile; \
48 .PHONY: veryclean/$(LOCAL)
49 veryclean: veryclean/$(LOCAL)
55 # Chain to the manpage rule
59 examples/sources.list: examples/sources.list.in apt-verbatim.ent
60 sed -e 's#&stable-codename;#$(shell grep --max-count=1 '^<!ENTITY stable-codename "' apt-verbatim.ent | cut -d'"' -f 2)#g' examples/sources.list.in > examples/sources.list
63 SOURCE = examples/apt.conf examples/sources.list examples/configure-index examples/apt-https-method-example.conf
68 .PHONY: clean clean-subdirs veryclean veryclean-subdirs all binary doc
71 veryclean: veryclean-subdirs
74 for dir in $(SUBDIRS); do\
75 $(MAKE) -C $$dir clean; \
79 for dir in $(SUBDIRS); do\
83 .PHONY: update-po po4a stats
89 po4a --previous --no-backups --force --no-translations \
90 --package-name='$(PACKAGE)-doc' --package-version='$(PACKAGE_VERSION)' \
91 --msgid-bugs-address='$(PACKAGE_MAIL)' po4a.conf
94 po4a --previous --no-backups \
95 --package-name='$(PACKAGE)-doc' --package-version='$(PACKAGE_VERSION)' \
96 --msgid-bugs-address='$(PACKAGE_MAIL)' po4a.conf
100 for i in po/*.po; do echo -n "$$i: "; msgfmt --output-file=/dev/null --statistics $$i; done
103 DOXYGEN_SOURCES = $(shell find $(BASE)/apt-pkg -not -name .\\\#* -and \( -name \*.cc -or -name \*.h \) )
108 rm -fr $(BUILD)/doc/doxygen
109 rm -f $(BUILD)/doc/doxygen-stamp
111 $(BUILD)/doc/doxygen-stamp: $(DOXYGEN_SOURCES) $(BUILD)/doc/Doxyfile
112 rm -fr $(BUILD)/doc/doxygen
113 mkdir $(BUILD)/doc/doxygen # some versions seem to not create this directory #628799
114 $(DOXYGEN) $(BUILD)/doc/Doxyfile
115 touch $(BUILD)/doc/doxygen-stamp
117 doc: $(BUILD)/doc/doxygen-stamp