]> git.saurik.com Git - apt.git/blame - doc/makefile
add spaces around PACKAGE_VERSION to fix FTBFS with -std=c++11
[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
e4bc41c7
DK
14MANPAGEPO = $(patsubst %.po,%,$(notdir $(wildcard po/*.po)))
15MANPAGEPOLIST = $(patsubst %,manpages-translation-%,$(MANPAGEPO))
16
17doc: manpages
18
e46a23a5
DK
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))
fd4bd902 23INCLUDES = apt.ent apt-verbatim.ent
e46a23a5
DK
24STYLESHEET=manpage-style.xsl
25
26LOCAL := manpage-$(firstword $(SOURCE))
27$(LOCAL)-LIST := $(SOURCE)
28
29# Install generation hooks
e4bc41c7 30manpages: $(MANPAGEPOLIST) $($(LOCAL)-LIST)
e46a23a5
DK
31
32$($(LOCAL)-LIST) :: % : %.xml $(INCLUDES)
33 echo Creating man page $@
34 $(XSLTPROC) -o $@ $(STYLESHEET) $<
35
e4bc41c7
DK
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
e46a23a5
DK
47# Clean rule
48.PHONY: veryclean/$(LOCAL)
e4bc41c7 49veryclean: veryclean/$(LOCAL)
e46a23a5
DK
50veryclean/$(LOCAL):
51 -rm -rf $($(@F)-LIST)
52
53endif
54
55# Chain to the manpage rule
56SOURCE = apt.8
57include $(MANPAGE_H)
c3c459fc
AL
58
59# Examples
fcdd9cdd 60SOURCE = examples/apt.conf examples/sources.list examples/configure-index examples/apt-https-method-example.conf
c3c459fc 61TO = $(DOC)
8319e9c3 62TARGET = binary
c3c459fc 63include $(COPY_H)
9975c278 64
b45fb8db 65.PHONY: clean clean-subdirs veryclean veryclean-subdirs all binary doc
9975c278 66
b01390ea
DK
67clean: clean-subdirs
68veryclean: veryclean-subdirs
f1813c1a 69
2a52e8c5
DK
70clean-subdirs:
71 for dir in $(SUBDIRS); do\
b01390ea
DK
72 $(MAKE) -C $$dir clean; \
73 done
74
75veryclean-subdirs:
76 for dir in $(SUBDIRS); do\
22d1b5c9 77 rm -rf $$dir; \
2a52e8c5 78 done
8667550d 79
a11afb9d
DK
80.PHONY: update-po po4a stats
81
b01390ea
DK
82ifdef PO4A
83doc: po4a
84
b01390ea
DK
85update-po:
86 po4a --previous --no-backups --force --no-translations po4a.conf
87
2a52e8c5
DK
88po4a:
89 po4a --previous --no-backups po4a.conf
a11afb9d 90endif
b45fb8db
DK
91
92stats:
93 for i in po/*.po; do echo -n "$$i: "; msgfmt --statistics $$i; done
94
3174e150
MV
95ifdef DOXYGEN
96DOXYGEN_SOURCES = $(shell find $(BASE)/apt-pkg -not -name .\\\#* -and \( -name \*.cc -or -name \*.h \) )
97
98clean: doxygen-clean
99
100doxygen-clean:
101 rm -fr $(BUILD)/doc/doxygen
102 rm -f $(BUILD)/doc/doxygen-stamp
103
3174e150
MV
104$(BUILD)/doc/doxygen-stamp: $(DOXYGEN_SOURCES) $(BUILD)/doc/Doxyfile
105 rm -fr $(BUILD)/doc/doxygen
00c6e1a3 106 mkdir $(BUILD)/doc/doxygen # some versions seem to not create this directory #628799
3174e150
MV
107 $(DOXYGEN) $(BUILD)/doc/Doxyfile
108 touch $(BUILD)/doc/doxygen-stamp
109
110doc: $(BUILD)/doc/doxygen-stamp
3174e150 111endif