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