Merge branch 'leak-fixes-33126'
[platform/upstream/dbus.git] / doc / Makefile.am
1 # automake normally assumes that man pages are generated files;
2 # these ones aren't, so we need the dist_ prefix to say that they're
3 # their own source code
4 dist_man1_MANS = \
5         dbus-cleanup-sockets.1 \
6         dbus-launch.1 \
7         dbus-monitor.1 \
8         dbus-send.1 \
9         dbus-uuidgen.1
10
11 # on the other hand, this one is generated
12 man1_MANS = \
13         dbus-daemon.1
14
15 MAN_IN_FILES = dbus-daemon.1.in
16
17 MAN_HTML_FILES = \
18         dbus-cleanup-sockets.1.html \
19         dbus-daemon.1.html \
20         dbus-launch.1.html \
21         dbus-monitor.1.html \
22         dbus-send.1.html \
23         dbus-uuidgen.1.html
24
25 DTDS = \
26         busconfig.dtd \
27         introspect.dtd
28
29 STATIC_DOCS = \
30         diagram.png \
31         diagram.svg \
32         dbus-faq.xml \
33         dbus-specification.xml \
34         dbus-test-plan.xml \
35         dbus-tutorial.xml \
36         dcop-howto.txt \
37         introspect.xsl \
38         system-activation.txt \
39         $(DTDS)
40
41 EXTRA_DIST = \
42         file-boilerplate.c \
43         $(STATIC_DOCS) \
44         $(MAN_IN_FILES)
45
46 HTML_FILES=                                     \
47         dbus-faq.html                           \
48         dbus-specification.html                 \
49         dbus-test-plan.html                     \
50         dbus-tutorial.html
51
52 if DBUS_XML_DOCS_ENABLED
53 all-local:: $(HTML_FILES)
54
55 EXTRA_DIST += $(HTML_FILES)
56
57 dbus-specification.html: dbus-specification.xml
58         $(XMLTO) html-nochunks $<
59
60 dbus-test-plan.html: dbus-test-plan.xml
61         $(XMLTO) html-nochunks $<
62
63 dbus-tutorial.html: dbus-tutorial.xml
64         $(XMLTO) html-nochunks $<
65
66 dbus-faq.html: dbus-faq.xml
67         $(XMLTO) html-nochunks $<
68
69 endif
70
71 if DBUS_DOXYGEN_DOCS_ENABLED
72 # Use the index as a proxy for the entire doc tree.
73 DOXYGEN_HTML_INDEX = api/html/index.html
74
75 all-local:: $(DOXYGEN_HTML_INDEX)
76
77 $(DOXYGEN_HTML_INDEX): $(wildcard $(top_srcdir)/dbus/*.[ch])
78         $(AM_V_GEN)cd $(top_builddir) && doxygen Doxyfile
79 endif
80
81 if DBUS_HAVE_MAN2HTML
82 all-local:: $(MAN_HTML_FILES)
83
84 %.1.html: %.1
85         $(AM_V_GEN)( $(MAN2HTML) $< > $@.tmp && mv $@.tmp $@ )
86 endif
87
88 if DBUS_CAN_UPLOAD_DOCS
89 BONUS_FILES = \
90         $(top_srcdir)/README \
91         $(top_srcdir)/HACKING \
92         $(top_srcdir)/AUTHORS \
93         $(top_srcdir)/NEWS \
94         $(top_srcdir)/COPYING \
95         $(top_srcdir)/ChangeLog
96
97 dbus-docs: $(STATIC_DOCS) $(HTML_FILES) $(MAN_HTML_FILES) $(BONUS_FILES) $(DOXYGEN_HTML_INDEX)
98         $(AM_V_at)rm -rf $@
99         $(AM_V_GEN)mkdir -p $@/api
100         $(AM_V_at)cp $(STATIC_DOCS) $@
101         $(AM_V_at)cp $(HTML_FILES) $@
102         $(AM_V_at)cp $(MAN_HTML_FILES) $@
103         $(AM_V_at)cp $(BONUS_FILES) $@
104         $(AM_V_at)cp -r api/html $@/api
105
106 dbus-docs.tar.gz: dbus-docs
107         $(AM_V_GEN)tar czf $@ $<
108
109 DOC_SERVER = dbus.freedesktop.org
110 DOC_WWW_DIR = /srv/dbus.freedesktop.org/www
111
112 SPECIFICATION_SERVER = specifications.freedesktop.org
113 SPECIFICATION_PATH = /srv/specifications.freedesktop.org/www/dbus/1.0
114
115 maintainer-upload-docs: dbus-docs.tar.gz dbus-docs
116         scp dbus-docs.tar.gz $(DOC_SERVER):$(DOC_WWW_DIR)
117         rsync -rvzP --chmod=Dg+s,ug+rwX,o=rX \
118                 dbus-docs/ $(DOC_SERVER):$(DOC_WWW_DIR)/doc/
119         scp -p $(DTDS) $(SPECIFICATION_SERVER):$(SPECIFICATION_PATH)
120 else
121 maintainer-upload-docs:
122         @echo "Can't upload documentation! Re-run configure with"
123         @echo "  --enable-doxygen-docs --enable-xml-docs"
124         @echo "and ensure that man2html is installed."
125         @false
126 endif
127
128 clean-local:
129         rm -rf api
130         rm -rf dbus-docs
131         rm -f *.1.html
132
133 maintainer-clean-local:
134         rm -f $(HTML_FILES)