]> git.saurik.com Git - apt.git/blame_incremental - doc/makefile
* doc/apt-verbatim.ent:
[apt.git] / doc / makefile
... / ...
CommitLineData
1# -*- make -*-
2BASE=..
3SUBDIR=doc
4SUBDIRS= $(dir $(wildcard */makefile))
5
6# Bring in the default rules
7include ../buildlib/defaults.mak
8
9# Debian Doc SGML Documents
10SOURCE = $(wildcard *.sgml)
11DEBIANDOC_HTML_OPTIONS=-l en.UTF-8
12include $(DEBIANDOC_H)
13
14MANPAGEPO = $(patsubst %.po,%,$(notdir $(wildcard po/*.po)))
15MANPAGEPOLIST = $(patsubst %,manpages-translation-%,$(MANPAGEPO))
16
17doc: manpages
18
19# Do not use XMLTO, build the manpages directly with XSLTPROC
20ifdef XSLTPROC
21# generate a list of accepted man page translations
22SOURCE = $(patsubst %.xml,%,$(wildcard *.?.xml))
23INCLUDES = apt.ent apt-verbatim.ent
24STYLESHEET=manpage-style.xsl
25
26LOCAL := manpage-$(firstword $(SOURCE))
27$(LOCAL)-LIST := $(SOURCE)
28
29# Install generation hooks
30manpages: $(MANPAGEPOLIST) $($(LOCAL)-LIST)
31
32$($(LOCAL)-LIST) :: % : %.xml $(STYLESHEET) $(INCLUDES)
33 echo Creating man page $@
34 $(XSLTPROC) -o $@ $(STYLESHEET) $<
35
36$(MANPAGEPOLIST) :: manpages-translation-% : %/makefile po4a
37 $(MAKE) -C $(dir $<) doc
38
39.PHONY: manpages dirs-manpage-subdirs $(MANPAGEPOLIST)
40dirs: dirs-manpage-subdirs
41dirs-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; \
45 done
46
47# Clean rule
48.PHONY: veryclean/$(LOCAL)
49veryclean: veryclean/$(LOCAL)
50veryclean/$(LOCAL):
51 -rm -rf $($(@F)-LIST)
52
53endif
54
55# Chain to the manpage rule
56SOURCE = apt.8
57include $(MANPAGE_H)
58
59# Examples
60SOURCE = examples/apt.conf examples/sources.list examples/configure-index examples/apt-https-method-example.conf
61TO = $(DOC)
62TARGET = binary
63include $(COPY_H)
64
65.PHONY: clean clean-subdirs veryclean veryclean-subdirs all binary doc
66
67clean: clean-subdirs
68veryclean: veryclean-subdirs
69
70clean-subdirs:
71 for dir in $(SUBDIRS); do\
72 $(MAKE) -C $$dir clean; \
73 done
74
75veryclean-subdirs:
76 for dir in $(SUBDIRS); do\
77 rm -rf $$dir; \
78 done
79
80.PHONY: update-po po4a stats
81
82ifdef PO4A
83doc: po4a
84
85update-po:
86 po4a --previous --no-backups --force --no-translations \
87 --package-name='$(PACKAGE)-doc' --package-version='$(PACKAGE_VERSION)' \
88 --msgid-bugs-address='$(PACKAGE_MAIL)' po4a.conf
89
90po4a:
91 po4a --previous --no-backups \
92 --package-name='$(PACKAGE)-doc' --package-version='$(PACKAGE_VERSION)' \
93 --msgid-bugs-address='$(PACKAGE_MAIL)' po4a.conf
94endif
95
96stats:
97 for i in po/*.po; do echo -n "$$i: "; msgfmt --output-file=/dev/null --statistics $$i; done
98
99ifdef DOXYGEN
100DOXYGEN_SOURCES = $(shell find $(BASE)/apt-pkg -not -name .\\\#* -and \( -name \*.cc -or -name \*.h \) )
101
102clean: doxygen-clean
103
104doxygen-clean:
105 rm -fr $(BUILD)/doc/doxygen
106 rm -f $(BUILD)/doc/doxygen-stamp
107
108$(BUILD)/doc/doxygen-stamp: $(DOXYGEN_SOURCES) $(BUILD)/doc/Doxyfile
109 rm -fr $(BUILD)/doc/doxygen
110 mkdir $(BUILD)/doc/doxygen # some versions seem to not create this directory #628799
111 $(DOXYGEN) $(BUILD)/doc/Doxyfile
112 touch $(BUILD)/doc/doxygen-stamp
113
114doc: $(BUILD)/doc/doxygen-stamp
115endif