]>
Commit | Line | Data |
---|---|---|
ac966541 AL |
1 | # -*- make -*- |
2 | BASE=.. | |
3164dff9 | 3 | SUBDIR=doc |
b01390ea | 4 | SUBDIRS= $(dir $(wildcard */makefile)) |
ac966541 AL |
5 | |
6 | # Bring in the default rules | |
7 | include ../buildlib/defaults.mak | |
8 | ||
b2e465d6 | 9 | # Debian Doc SGML Documents |
7652e03e | 10 | SOURCE = $(wildcard *.sgml) |
46e39c8e | 11 | DEBIANDOC_HTML_OPTIONS=-l en.UTF-8 |
ac966541 AL |
12 | include $(DEBIANDOC_H) |
13 | ||
e46a23a5 DK |
14 | # Do not use XMLTO, build the manpages directly with XSLTPROC |
15 | ifdef XSLTPROC | |
16 | # generate a list of accepted man page translations | |
17 | SOURCE = $(patsubst %.xml,%,$(wildcard *.?.xml)) | |
18 | INCLUDES = apt.ent | |
19 | STYLESHEET=manpage-style.xsl | |
20 | ||
21 | LOCAL := manpage-$(firstword $(SOURCE)) | |
22 | $(LOCAL)-LIST := $(SOURCE) | |
23 | ||
24 | # Install generation hooks | |
25 | doc: $($(LOCAL)-LIST) | |
26 | veryclean: veryclean/$(LOCAL) | |
27 | ||
28 | $($(LOCAL)-LIST) :: % : %.xml $(INCLUDES) | |
29 | echo Creating man page $@ | |
30 | $(XSLTPROC) -o $@ $(STYLESHEET) $< | |
31 | ||
32 | # Clean rule | |
33 | .PHONY: veryclean/$(LOCAL) | |
34 | veryclean/$(LOCAL): | |
35 | -rm -rf $($(@F)-LIST) | |
36 | ||
37 | endif | |
38 | ||
39 | # Chain to the manpage rule | |
40 | SOURCE = apt.8 | |
41 | include $(MANPAGE_H) | |
c3c459fc AL |
42 | |
43 | # Examples | |
fcdd9cdd | 44 | SOURCE = examples/apt.conf examples/sources.list examples/configure-index examples/apt-https-method-example.conf |
c3c459fc | 45 | TO = $(DOC) |
8319e9c3 | 46 | TARGET = binary |
c3c459fc | 47 | include $(COPY_H) |
9975c278 | 48 | |
b45fb8db | 49 | .PHONY: clean clean-subdirs veryclean veryclean-subdirs all binary doc |
b01390ea | 50 | doc: |
b45fb8db DK |
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; \ | |
54 | done | |
55 | # it is likely that we have changed the list, so SUBDIRS is incorrect | |
56 | for dir in $(dir $(wildcard */makefile)); do\ | |
2a52e8c5 DK |
57 | $(MAKE) -C $$dir $@; \ |
58 | done | |
9975c278 | 59 | |
b01390ea DK |
60 | clean: clean-subdirs |
61 | veryclean: veryclean-subdirs | |
f1813c1a | 62 | |
2a52e8c5 DK |
63 | clean-subdirs: |
64 | for dir in $(SUBDIRS); do\ | |
b01390ea DK |
65 | $(MAKE) -C $$dir clean; \ |
66 | done | |
67 | ||
68 | veryclean-subdirs: | |
69 | for dir in $(SUBDIRS); do\ | |
70 | $(MAKE) -C $$dir veryclean; \ | |
2a52e8c5 | 71 | done |
8667550d | 72 | |
b01390ea DK |
73 | ifdef PO4A |
74 | doc: po4a | |
75 | ||
76 | clean: po4a-clean | |
77 | ||
b45fb8db | 78 | .PHONY: update-po po4a stats |
b01390ea DK |
79 | update-po: |
80 | po4a --previous --no-backups --force --no-translations po4a.conf | |
81 | ||
2a52e8c5 DK |
82 | po4a-clean: |
83 | po4a --previous --rm-backups --rm-translations po4a.conf | |
640c5d94 | 84 | |
2a52e8c5 DK |
85 | po4a: |
86 | po4a --previous --no-backups po4a.conf | |
b45fb8db DK |
87 | |
88 | stats: | |
89 | for i in po/*.po; do echo -n "$$i: "; msgfmt --statistics $$i; done | |
90 | ||
b01390ea | 91 | endif |
3174e150 MV |
92 | |
93 | ifdef DOXYGEN | |
94 | DOXYGEN_SOURCES = $(shell find $(BASE)/apt-pkg -not -name .\\\#* -and \( -name \*.cc -or -name \*.h \) ) | |
95 | ||
96 | clean: doxygen-clean | |
97 | ||
98 | doxygen-clean: | |
99 | rm -fr $(BUILD)/doc/doxygen | |
100 | rm -f $(BUILD)/doc/doxygen-stamp | |
101 | ||
102 | $(BUILD)/doc/Doxyfile: Doxyfile.in | |
103 | (cd $(BUILD) && ./config.status doc/Doxyfile) | |
104 | ||
105 | $(BUILD)/doc/doxygen-stamp: $(DOXYGEN_SOURCES) $(BUILD)/doc/Doxyfile | |
106 | rm -fr $(BUILD)/doc/doxygen | |
107 | $(DOXYGEN) $(BUILD)/doc/Doxyfile | |
108 | touch $(BUILD)/doc/doxygen-stamp | |
109 | ||
110 | doc: $(BUILD)/doc/doxygen-stamp | |
3174e150 | 111 | endif |