@@ -32,11 +32,24 @@ PAPER ?= letter
3232# Additional options for sphinx-build
3333SPHINXFLAGS ?=
3434
35+ # toplevel rsync destination for www targets (without trailing slash)
36+ RSYNC_DEST ?= root@www.clusterlabs.org:/var/www/html
37+
3538# End of useful overrides
3639
3740
3841EXTRA_DIST = $(wildcard * /* .rst)
3942
43+ # recursive, preserve symlinks/permissions/times, verbose, compress,
44+ # don't cross filesystems, sparse, show progress
45+ RSYNC_OPTS = -rlptvzxS --progress
46+
47+ BOOK_RSYNC_DEST = $(RSYNC_DEST ) /$(PACKAGE ) /doc/$(PACKAGE_SERIES )
48+
49+ TAG ?= $(shell [ -n "`git tag --points-at HEAD | head -1`" ] \
50+ && ( git tag --points-at HEAD | head -1 ) \
51+ || git log --pretty=format:Pacemaker-2.0.3-%h -n 1 HEAD)
52+
4053BOOK = none
4154
4255if BUILD_SPHINX_DOCS
@@ -70,6 +83,21 @@ $(BOOK)/_build: _static/pacemaker.css $(BOOK)/conf.py $(wildcard $(srcdir)/$(BOO
7083 done
7184endif
7285
86+ .PHONY : books-upload
87+ books-upload : all
88+ if BUILD_SPHINX_DOCS
89+ @echo "Uploading $(PACKAGE_SERIES) documentation set"
90+ @for book in $(BOOKS); do \
91+ echo " * $$book"; \
92+ buildfile="$$book/_build/build-$(PACKAGE_SERIES).txt"; \
93+ echo "Generated on `date --utc` from version $(TAG)" \
94+ > "$$buildfile"; \
95+ rsync $(RSYNC_OPTS) "$$buildfile" \
96+ $(BOOK_FORMATS:%=$$book/_build/%) \
97+ "$(BOOK_RSYNC_DEST)/$$book/"; \
98+ done
99+ endif
100+
73101all-local :
74102if BUILD_SPHINX_DOCS
75103 @for book in $(BOOKS); do \
0 commit comments