+if DBUS_CAN_UPLOAD_DOCS
+BONUS_FILES = \
+ $(top_srcdir)/README \
+ $(top_srcdir)/HACKING \
+ $(top_srcdir)/AUTHORS \
+ $(top_srcdir)/NEWS \
+ $(top_srcdir)/COPYING \
+ $(top_srcdir)/ChangeLog
+
+dbus-docs: $(STATIC_DOCS) $(dist_doc_DATA) $(dist_html_DATA) $(MAN_HTML_FILES) $(BONUS_FILES) doxygen.stamp
+ $(AM_V_at)rm -rf $@ $@.tmp
+ $(AM_V_GEN)$(MKDIR_P) $@.tmp/api
+ $(AM_V_at)cd $(srcdir) && cp $(STATIC_DOCS) @abs_builddir@/$@.tmp
+ $(AM_V_at)cd $(srcdir) && cp $(dist_doc_DATA) @abs_builddir@/$@.tmp
+ $(AM_V_at)cd $(srcdir) && cp $(STATIC_HTML) @abs_builddir@/$@.tmp
+ $(AM_V_at)cp $(XMLTO_OUTPUT) @abs_builddir@/$@.tmp
+ $(AM_V_at)cp $(MAN_HTML_FILES) @abs_builddir@/$@.tmp
+ $(AM_V_at)cp $(BONUS_FILES) @abs_builddir@/$@.tmp
+ $(AM_V_at)cp -r api/html @abs_builddir@/$@.tmp/api
+ $(AM_V_at)mv $@.tmp $@
+
+dbus-docs.tar.gz: dbus-docs
+ $(AM_V_GEN)tar czf $@ $<
+
+DOC_SERVER = dbus.freedesktop.org
+DOC_WWW_DIR = /srv/dbus.freedesktop.org/www
+
+SPECIFICATION_SERVER = specifications.freedesktop.org
+SPECIFICATION_PATH = /srv/specifications.freedesktop.org/www/dbus/1.0
+
+maintainer-upload-docs: dbus-docs.tar.gz dbus-docs
+ scp dbus-docs.tar.gz $(DOC_SERVER):$(DOC_WWW_DIR)/
+ rsync -rpvzP --chmod=Dg+s,ug+rwX,o=rX \
+ dbus-docs/ $(DOC_SERVER):$(DOC_WWW_DIR)/doc/
+ cd $(srcdir) && scp -p $(DTDS) $(SPECIFICATION_SERVER):$(SPECIFICATION_PATH)/
+else
+maintainer-upload-docs:
+ @echo "Can't upload documentation! Re-run configure with"
+ @echo " --enable-doxygen-docs --enable-xml-docs"
+ @echo "and ensure that man2html is installed."
+ @false
+endif
+
+clean-local:
+ rm -f $(html_DATA)
+ rm -rf api
+ rm -rf dbus-docs dbus-docs.tmp
+ rm -f *.1.html
+ rm -f doxygen.stamp
+