[folks] Add rules for uploading generated docs to freedesktop.org



commit dbca13c608291a69c2cc7abdfd0b0422336d475c
Author: Travis Reitter <travis reitter collabora co uk>
Date:   Tue Aug 2 10:48:53 2011 -0700

    Add rules for uploading generated docs to freedesktop.org
    
    In the future, we should copy the remaining rules from telepathy-glib's setup,
    which restrict doc uploads to releases (as well as simplifying other details of
    releases).

 Makefile.am      |    3 +++
 docs/Makefile.am |   30 ++++++++++++++++++++++++++++++
 2 files changed, 33 insertions(+), 0 deletions(-)
---
diff --git a/Makefile.am b/Makefile.am
index a0540d4..8906204 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -58,6 +58,9 @@ distcleancheck_listfiles = \
 	find . -type f -exec sh -c 'test -f $(srcdir)/$$1 || echo $$1' \
 		sh '{}' ';'
 
+maintainer-upload-release:
+	$(MAKE) -C docs maintainer-upload-release
+
 ChangeLog:
 	@echo Creating $@
 	@if test -d "$(srcdir)/.git"; then \
diff --git a/docs/Makefile.am b/docs/Makefile.am
index 7de9260..28d28f5 100644
--- a/docs/Makefile.am
+++ b/docs/Makefile.am
@@ -11,6 +11,13 @@ phony_deps = \
 	folks-telepathy-gtk-doc \
 	$(NULL)
 
+upload_docs = \
+	upload-docs-c-folks \
+	upload-docs-vala-folks \
+	upload-docs-c-folks-telepathy \
+	upload-docs-vala-folks-telepathy \
+	$(NULL)
+
 folksdocdir=$(datadir)/devhelp/references/folks
 folksimgdir=$(datadir)/devhelp/references/folks/img
 folkstelepathydocdir=$(datadir)/devhelp/references/folks-telepathy
@@ -191,6 +198,7 @@ phony_deps += \
 	folks-eds-doc \
 	folks-eds-gtk-doc \
 	$(NULL)
+upload_docs += upload-docs-c-folks-eds upload-docs-vala-folks-eds
 
 endif # ENABLE_EDS
 
@@ -258,6 +266,10 @@ phony_deps += \
 	folks-libsocialweb-doc \
 	folks-libsocialweb-gtk-doc \
 	$(NULL)
+upload_docs += \
+	upload-docs-c-folks-libsocialweb \
+	upload-docs-vala-folks-libsocialweb \
+	$(NULL)
 
 endif # ENABLE_LIBSOCIALWEB
 
@@ -267,6 +279,24 @@ endif # ENABLE_LIBSOCIALWEB
 
 .PHONY: $(phony_deps)
 
+doc_host = telepathy.freedesktop.org
+doc_host_dir = /srv/telepathy.freedesktop.org/www/doc
+
+upload-docs-check-%: %
+	ssh $(doc_host) "test -e $(doc_host_dir)/$< || mkdir $(doc_host_dir)/$<"
+
+# adapted from telepathy-glib
+upload-docs-c-%: gtk-doc/% upload-docs-check-%
+	rsync -rvzPp --chmod=Dg+s,ug+rwX,o=rX $(top_srcdir)/docs/$</html/ \
+		$(doc_host):$(doc_host_dir)/$(<F)/c
+
+upload-docs-vala-%: % upload-docs-check-%
+	rsync -rvzPp --chmod=Dg+s,ug+rwX,o=rX $(top_srcdir)/docs/$</$</ \
+		$(doc_host):$(doc_host_dir)/$</vala
+
+maintainer-upload-release: _maintainer-upload-release-local
+_maintainer-upload-release-local: $(upload_docs)
+
 distclean-local: distclean-docs
 distclean-docs:
 	rm -rf $(distclean_dirs)



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]