]> git.saurik.com Git - apt-legacy.git/blame - doc/makefile
Ported to APT 0.7.25.3.
[apt-legacy.git] / doc / makefile
CommitLineData
da6ee469
JF
1# -*- make -*-
2BASE=..
3SUBDIR=doc
0e5943eb 4SUBDIRS= $(dir $(wildcard */makefile))
da6ee469
JF
5
6# Bring in the default rules
7include ../buildlib/defaults.mak
8
9# Debian Doc SGML Documents
0e5943eb
JF
10SOURCE = $(wildcard *.sgml)
11DEBIANDOC_HTML_OPTIONS=-l en.UTF-8
da6ee469
JF
12include $(DEBIANDOC_H)
13
0e5943eb
JF
14# Do not use XMLTO, build the manpages directly with XSLTPROC
15ifdef XSLTPROC
16# generate a list of accepted man page translations
17SOURCE = $(patsubst %.xml,%,$(wildcard *.?.xml))
18INCLUDES = apt.ent
19STYLESHEET=manpage-style.xsl
20
21LOCAL := manpage-$(firstword $(SOURCE))
22$(LOCAL)-LIST := $(SOURCE)
23
24# Install generation hooks
25doc: $($(LOCAL)-LIST)
26veryclean: 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)
34veryclean/$(LOCAL):
35 -rm -rf $($(@F)-LIST)
36
37endif
38
39# Chain to the manpage rule
40SOURCE = apt.8
41include $(MANPAGE_H)
da6ee469
JF
42
43# Examples
00ec24d0 44SOURCE = examples/apt.conf examples/sources.list examples/configure-index examples/apt-https-method-example.conf
da6ee469
JF
45TO = $(DOC)
46TARGET = binary
47include $(COPY_H)
48
49#.PHONY: headers library clean veryclean all binary program doc doc.pt_BR doc.fr
0e5943eb
JF
50doc:
51 for dir in $(SUBDIRS); do\
52 $(MAKE) -C $$dir $@; \
53 done
54
55clean: clean-subdirs
56veryclean: veryclean-subdirs
57
58clean-subdirs:
59 for dir in $(SUBDIRS); do\
60 $(MAKE) -C $$dir clean; \
61 done
da6ee469 62
0e5943eb
JF
63veryclean-subdirs:
64 for dir in $(SUBDIRS); do\
65 $(MAKE) -C $$dir veryclean; \
66 done
da6ee469 67
0e5943eb
JF
68ifdef PO4A
69doc: po4a
da6ee469 70
0e5943eb 71clean: po4a-clean
da6ee469 72
0e5943eb
JF
73.PHONY: update-po po4a
74update-po:
75 po4a --previous --no-backups --force --no-translations po4a.conf
da6ee469 76
0e5943eb
JF
77po4a-clean:
78 po4a --previous --rm-backups --rm-translations po4a.conf
79
80po4a:
81 po4a --previous --no-backups po4a.conf
82endif
00ec24d0
JF
83
84ifdef DOXYGEN
85DOXYGEN_SOURCES = $(shell find $(BASE)/apt-pkg -not -name .\\\#* -and \( -name \*.cc -or -name \*.h \) )
86
87clean: doxygen-clean
88
89doxygen-clean:
90 rm -fr $(BUILD)/doc/doxygen
91 rm -f $(BUILD)/doc/doxygen-stamp
92
93$(BUILD)/doc/Doxyfile: Doxyfile.in
94 (cd $(BUILD) && ./config.status doc/Doxyfile)
95
96$(BUILD)/doc/doxygen-stamp: $(DOXYGEN_SOURCES) $(BUILD)/doc/Doxyfile
97 rm -fr $(BUILD)/doc/doxygen
98 $(DOXYGEN) $(BUILD)/doc/Doxyfile
99 touch $(BUILD)/doc/doxygen-stamp
100
101doc: $(BUILD)/doc/doxygen-stamp
00ec24d0 102endif