]> git.saurik.com Git - apt.git/blame - doc/makefile
Allow the FileFd to use an external Compressor to uncompress a given file
[apt.git] / doc / makefile
CommitLineData
ac966541
AL
1# -*- make -*-
2BASE=..
3164dff9 3SUBDIR=doc
b01390ea 4SUBDIRS= $(dir $(wildcard */makefile))
ac966541
AL
5
6# Bring in the default rules
7include ../buildlib/defaults.mak
8
b2e465d6 9# Debian Doc SGML Documents
7652e03e 10SOURCE = $(wildcard *.sgml)
46e39c8e 11DEBIANDOC_HTML_OPTIONS=-l en.UTF-8
ac966541
AL
12include $(DEBIANDOC_H)
13
e46a23a5
DK
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)
c3c459fc
AL
42
43# Examples
fcdd9cdd 44SOURCE = examples/apt.conf examples/sources.list examples/configure-index examples/apt-https-method-example.conf
c3c459fc 45TO = $(DOC)
8319e9c3 46TARGET = binary
c3c459fc 47include $(COPY_H)
9975c278 48
b45fb8db 49.PHONY: clean clean-subdirs veryclean veryclean-subdirs all binary doc
b01390ea 50doc:
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; \
22d1b5c9 54 $(MAKE) -C $$i $@; \
2a52e8c5 55 done
9975c278 56
b01390ea
DK
57clean: clean-subdirs
58veryclean: veryclean-subdirs
f1813c1a 59
2a52e8c5
DK
60clean-subdirs:
61 for dir in $(SUBDIRS); do\
b01390ea
DK
62 $(MAKE) -C $$dir clean; \
63 done
64
65veryclean-subdirs:
66 for dir in $(SUBDIRS); do\
22d1b5c9 67 rm -rf $$dir; \
2a52e8c5 68 done
8667550d 69
b01390ea
DK
70ifdef PO4A
71doc: po4a
72
73clean: po4a-clean
74
b45fb8db 75.PHONY: update-po po4a stats
b01390ea
DK
76update-po:
77 po4a --previous --no-backups --force --no-translations po4a.conf
78
2a52e8c5
DK
79po4a-clean:
80 po4a --previous --rm-backups --rm-translations po4a.conf
640c5d94 81
2a52e8c5
DK
82po4a:
83 po4a --previous --no-backups po4a.conf
b45fb8db
DK
84
85stats:
86 for i in po/*.po; do echo -n "$$i: "; msgfmt --statistics $$i; done
87
b01390ea 88endif
3174e150
MV
89
90ifdef DOXYGEN
91DOXYGEN_SOURCES = $(shell find $(BASE)/apt-pkg -not -name .\\\#* -and \( -name \*.cc -or -name \*.h \) )
92
93clean: doxygen-clean
94
95doxygen-clean:
96 rm -fr $(BUILD)/doc/doxygen
97 rm -f $(BUILD)/doc/doxygen-stamp
98
99$(BUILD)/doc/Doxyfile: Doxyfile.in
100 (cd $(BUILD) && ./config.status doc/Doxyfile)
101
102$(BUILD)/doc/doxygen-stamp: $(DOXYGEN_SOURCES) $(BUILD)/doc/Doxyfile
103 rm -fr $(BUILD)/doc/doxygen
00c6e1a3 104 mkdir $(BUILD)/doc/doxygen # some versions seem to not create this directory #628799
3174e150
MV
105 $(DOXYGEN) $(BUILD)/doc/Doxyfile
106 touch $(BUILD)/doc/doxygen-stamp
107
108doc: $(BUILD)/doc/doxygen-stamp
3174e150 109endif