summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorSimon McVittie <simon.mcvittie@collabora.co.uk>2011-09-20 18:44:25 +0100
committerSimon McVittie <simon.mcvittie@collabora.co.uk>2011-09-21 11:25:48 +0100
commitf4c02e7829648bf8a5f966fd9a132f9ea4f73cda (patch)
treeef716f3551ba38af7ea57b6407325bf5cd6d4ebf /doc
parent70b0ffd50188001c261f0c88400ce9b09b25669e (diff)
downloaddbus-f4c02e7829648bf8a5f966fd9a132f9ea4f73cda.tar.gz
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: https://bugs.freedesktop.org/show_bug.cgi?id=41047 Reviewed-by: Will Thompson <will.thompson@collabora.co.uk>
Diffstat (limited to 'doc')
-rw-r--r--doc/Makefile.am39
1 files changed, 25 insertions, 14 deletions
diff --git a/doc/Makefile.am b/doc/Makefile.am
index b36777cd..3fdb7803 100644
--- a/doc/Makefile.am
+++ b/doc/Makefile.am
@@ -30,6 +30,7 @@ DTDS = \
dist_doc_DATA = system-activation.txt
+# uploaded and distributed, but not installed
STATIC_DOCS = \
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
+STATIC_HTML = \
diagram.png \
diagram.svg \
- $(XMLTO_OUTPUT)
+ $(NULL)
+
+dist_html_DATA += $(STATIC_HTML)
+
+# we distribute these in the tarball so users don't necessarily need xmlto
+dist_html_DATA += $(XMLTO_OUTPUT)
XMLTO_OUTPUT= \
dbus-faq.html \
@@ -122,14 +131,16 @@ BONUS_FILES = \
$(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 $@
- $(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 = 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)
+ 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/
- scp -p $(DTDS) $(SPECIFICATION_SERVER):$(SPECIFICATION_PATH)
+ cd $(srcdir) && scp -p $(DTDS) $(SPECIFICATION_SERVER):$(SPECIFICATION_PATH)/
else
maintainer-upload-docs:
@echo "Can't upload documentation! Re-run configure with"
@@ -156,7 +167,7 @@ endif
clean-local:
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