Commit f4c02e78 authored by Simon McVittie's avatar Simon McVittie

Fix maintainer-upload-docs target to work out-of-tree

The STATIC_DOCS, DTDS and all dist_ files except XMLTO_OUTPUT are in the
source tree. The XMLTO_OUTPUT and the man2html output are in the build
tree, and the BONUS_FILES already have $(srcdir) in their names.

Also change the rules that generate the dbus-docs directory so that if
they fail, they leave behind a temporary directory, rather than leaving
behind a dbus-docs directory that causes make to not run those rules
if re-run; and change the rules to scp files to the server, to put a
trailing "/" on paths, ensuring that the tarball won't be uploaded as
"www" if the www directory doesn't already exist.

Bug: Will Thompson's avatarWill Thompson <>
parent 70b0ffd5
......@@ -30,6 +30,7 @@ DTDS = \
dist_doc_DATA = system-activation.txt
# uploaded and distributed, but not installed
dbus-faq.xml \
dbus-specification.xml \
......@@ -47,11 +48,19 @@ EXTRA_DIST = \
html_DATA =
# we distribute these in the tarball so users don't necessarily need xmlto
dist_html_DATA = \
dist_html_DATA =
# diagram.png/diagram.svg aren't really HTML, but must go in the same
# directory as the HTML to avoid broken links
diagram.png \
diagram.svg \
dist_html_DATA += $(STATIC_HTML)
# we distribute these in the tarball so users don't necessarily need xmlto
dist_html_DATA += $(XMLTO_OUTPUT)
dbus-faq.html \
......@@ -122,14 +131,16 @@ BONUS_FILES = \
dbus-docs: $(STATIC_DOCS) $(dist_doc_DATA) $(dist_html_DATA) $(MAN_HTML_FILES) $(BONUS_FILES) doxygen.stamp
$(AM_V_at)rm -rf $@
$(AM_V_GEN)$(MKDIR_P) $@/api
$(AM_V_at)cp $(STATIC_DOCS) $@
$(AM_V_at)cp $(dist_doc_DATA) $@
$(AM_V_at)cp $(dist_html_DATA) $@
$(AM_V_at)cp $(MAN_HTML_FILES) $@
$(AM_V_at)cp $(BONUS_FILES) $@
$(AM_V_at)cp -r api/html $@/api
$(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 $@ $<
......@@ -141,10 +152,10 @@ SPECIFICATION_SERVER =
maintainer-upload-docs: dbus-docs.tar.gz dbus-docs
scp dbus-docs.tar.gz $(DOC_SERVER):$(DOC_WWW_DIR)
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/
@echo "Can't upload documentation! Re-run configure with"
......@@ -156,7 +167,7 @@ endif
rm -f $(html_DATA)
rm -rf api
rm -rf dbus-docs
rm -rf dbus-docs dbus-docs.tmp
rm -f *.1.html
rm -f doxygen.stamp
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment