]> git.saurik.com Git - apt.git/blame_incremental - doc/makefile
[ Bogdan Purcareata ]
[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
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)
42
43# Examples
44SOURCE = examples/apt.conf examples/sources.list examples/configure-index examples/apt-https-method-example.conf
45TO = $(DOC)
46TARGET = binary
47include $(COPY_H)
48
49.PHONY: clean clean-subdirs veryclean veryclean-subdirs all binary doc
50doc:
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 $(MAKE) -C $$i $@; \
55 done
56
57clean: clean-subdirs
58veryclean: veryclean-subdirs
59
60clean-subdirs:
61 for dir in $(SUBDIRS); do\
62 $(MAKE) -C $$dir clean; \
63 done
64
65veryclean-subdirs:
66 for dir in $(SUBDIRS); do\
67 rm -rf $$dir; \
68 done
69
70.PHONY: update-po po4a stats
71
72ifdef PO4A
73doc: po4a
74
75update-po:
76 po4a --previous --no-backups --force --no-translations po4a.conf
77
78po4a:
79 po4a --previous --no-backups po4a.conf
80endif
81
82stats:
83 for i in po/*.po; do echo -n "$$i: "; msgfmt --statistics $$i; done
84
85ifdef DOXYGEN
86DOXYGEN_SOURCES = $(shell find $(BASE)/apt-pkg -not -name .\\\#* -and \( -name \*.cc -or -name \*.h \) )
87
88clean: doxygen-clean
89
90doxygen-clean:
91 rm -fr $(BUILD)/doc/doxygen
92 rm -f $(BUILD)/doc/doxygen-stamp
93
94$(BUILD)/doc/doxygen-stamp: $(DOXYGEN_SOURCES) $(BUILD)/doc/Doxyfile
95 rm -fr $(BUILD)/doc/doxygen
96 mkdir $(BUILD)/doc/doxygen # some versions seem to not create this directory #628799
97 $(DOXYGEN) $(BUILD)/doc/Doxyfile
98 touch $(BUILD)/doc/doxygen-stamp
99
100doc: $(BUILD)/doc/doxygen-stamp
101endif