diff options
Diffstat (limited to 'GNUmakefile')
-rw-r--r-- | GNUmakefile | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/GNUmakefile b/GNUmakefile index da1e1e3..574e77a 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -1,5 +1,6 @@ # use GNU Make to run tests in parallel, and without depending on Rubygems all:: test +RSYNC_DEST := bogomips.org:/srv/bogomips/mogilefs-client T := $(wildcard test/test*.rb) TO := $(subst .rb,.log,$(T)) @@ -56,3 +57,37 @@ flog: $(libs) check-warnings: @(for i in $$(git ls-files '*.rb'| grep -v '^setup\.rb$$'); \ do ruby -d -W2 -c $$i; done) | grep -v '^Syntax OK$$' || : +RSYNC = rsync +WRONGDOC = wrongdoc + +doc:: .document .wrongdoc.yml $(pkg_extra) + -find lib -type f -name '*.rbc' -exec rm -f '{}' ';' + $(RM) -r doc + $(WRONGDOC) all + install -m644 $(shell LC_ALL=C grep '^[A-Z]' .document) doc/ + cd doc && \ + ln -s README README.txt && \ + ln -s README.html README_txt.html && \ + ln -s LICENSE LICENSE.txt && \ + ln -s LICENSE.html LICENSE_txt.html && \ + ln -s History History.txt && \ + ln -s History.html History_txt.html + +# Create gzip variants of the same timestamp as the original so nginx +# "gzip_static on" can serve the gzipped versions directly. +doc_gz: docs = $(shell find doc -type f ! -regex '^.*\.\(gif\|jpg\|png\|gz\)$$') +doc_gz: + for i in $(docs); do \ + gzip --rsyncable -9 < $$i > $$i.gz; touch -r $$i $$i.gz; done + +# this requires GNU coreutils variants +ifneq ($(RSYNC_DEST),) +publish_doc: + -git set-file-times + $(MAKE) doc + find doc/images -type f | \ + TZ=UTC xargs touch -d '1970-01-01 00:00:06' doc/rdoc.css + $(MAKE) doc_gz + $(RSYNC) -av doc/ $(RSYNC_DEST)/ + git ls-files | xargs touch +endif |