11
11
DEBIANDOC_HTML_OPTIONS=-l en.UTF-8
12
12
include $(DEBIANDOC_H)
14
MANPAGEPO = $(patsubst %.po,%,$(notdir $(wildcard po/*.po)))
15
MANPAGEPOLIST = $(patsubst %,manpages-translation-%,$(MANPAGEPO))
14
19
# Do not use XMLTO, build the manpages directly with XSLTPROC
16
21
# generate a list of accepted man page translations
17
22
SOURCE = $(patsubst %.xml,%,$(wildcard *.?.xml))
23
INCLUDES = apt.ent apt-verbatim.ent
19
24
STYLESHEET=manpage-style.xsl
21
26
LOCAL := manpage-$(firstword $(SOURCE))
22
27
$(LOCAL)-LIST := $(SOURCE)
24
29
# Install generation hooks
26
veryclean: veryclean/$(LOCAL)
30
manpages: $(MANPAGEPOLIST) $($(LOCAL)-LIST)
28
$($(LOCAL)-LIST) :: % : %.xml $(INCLUDES)
32
$($(LOCAL)-LIST) :: % : %.xml $(STYLESHEET) $(INCLUDES)
29
33
echo Creating man page $@
30
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; \
33
48
.PHONY: veryclean/$(LOCAL)
49
veryclean: veryclean/$(LOCAL)
34
50
veryclean/$(LOCAL):
35
51
-rm -rf $($(@F)-LIST)
49
68
.PHONY: clean clean-subdirs veryclean veryclean-subdirs all binary doc
51
for i in $(shell ls po/*.po | sed -r 's#po/([a-z]+[A-Z_]*).po#\1#'); do \
52
test -d $$i || mkdir $$i; \
53
test -f $$i/makefile || sed "s#@@LANG@@#$$i#" lang.makefile > $$i/makefile; \
57
70
clean: clean-subdirs
58
71
veryclean: veryclean-subdirs
83
.PHONY: update-po po4a stats
75
.PHONY: update-po po4a stats
77
po4a --previous --no-backups --force --no-translations po4a.conf
80
po4a --previous --rm-backups --rm-translations po4a.conf
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
83
po4a --previous --no-backups po4a.conf
94
po4a --previous --no-backups \
95
--package-name='$(PACKAGE)-doc' --package-version='$(PACKAGE_VERSION)' \
96
--msgid-bugs-address='$(PACKAGE_MAIL)' po4a.conf
86
for i in po/*.po; do echo -n "$$i: "; msgfmt --statistics $$i; done
100
for i in po/*.po; do echo -n "$$i: "; msgfmt --output-file=/dev/null --statistics $$i; done
91
103
DOXYGEN_SOURCES = $(shell find $(BASE)/apt-pkg -not -name .\\\#* -and \( -name \*.cc -or -name \*.h \) )
96
108
rm -fr $(BUILD)/doc/doxygen
97
109
rm -f $(BUILD)/doc/doxygen-stamp
99
$(BUILD)/doc/Doxyfile: Doxyfile.in
100
(cd $(BUILD) && ./config.status doc/Doxyfile)
102
111
$(BUILD)/doc/doxygen-stamp: $(DOXYGEN_SOURCES) $(BUILD)/doc/Doxyfile
103
112
rm -fr $(BUILD)/doc/doxygen
104
113
mkdir $(BUILD)/doc/doxygen # some versions seem to not create this directory #628799