diff options
author | Eric Wong <normalperson@yhbt.net> | 2010-05-02 16:57:58 -0700 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2010-05-02 16:59:29 -0700 |
commit | c48b2ce337bddd5f0e7f0a6a21dfd7fc925f1e42 (patch) | |
tree | e41a2ee3da7909f6f5d246063b4a05a184f7f530 | |
parent | 0f316f004787c4a86c854cc251e2c3cbf8c2dce3 (diff) | |
download | raindrops-c48b2ce337bddd5f0e7f0a6a21dfd7fc925f1e42.tar.gz |
-rw-r--r-- | GNUmakefile | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/GNUmakefile b/GNUmakefile index bf1a02a..416b87f 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -2,6 +2,7 @@ all:: RUBY = ruby RAKE = rake +RSYNC = rsync GIT_URL = git://git.bogomips.org/raindrops.git GIT-VERSION-FILE: .FORCE-GIT-VERSION-FILE @@ -49,6 +50,9 @@ NEWS: GIT-VERSION-FILE $(RAKE) -s news_rdoc > $@+ mv $@+ $@ +latest: NEWS + @awk 'BEGIN{RS="=== ";ORS=""}NR==2{sub(/\n$$/,"");print RS""$$0 }' $< + SINCE = ChangeLog: LOG_VERSION = \ $(shell git rev-parse -q "$(GIT_VERSION)" >/dev/null 2>&1 && \ @@ -169,4 +173,25 @@ test-unit: $(test_units) $(test_units): build $(RUBY) -I lib:ext/raindrops $@ +# this requires GNU coreutils variants +publish_doc: + -git set-file-times + $(RM) -r doc ChangeLog NEWS + $(MAKE) doc LOG_VERSION=$(shell git tag -l | tail -1) + $(MAKE) -s latest > doc/LATEST + find doc/images doc/js -type f | \ + TZ=UTC xargs touch -d '1970-01-01 00:00:00' doc/rdoc.css + $(MAKE) doc_gz + chmod 644 $$(find doc -type f) + $(RSYNC) -av doc/ raindrops.bogomips.org:/srv/raindrops/ + git ls-files | xargs touch + +# 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: + touch doc/NEWS.atom.xml -d "$$(awk 'NR==1{print $$4,$$5,$$6}' NEWS)" + for i in $(docs); do \ + gzip --rsyncable -9 < $$i > $$i.gz; touch -r $$i $$i.gz; done + .PHONY: .FORCE-GIT-VERSION-FILE doc manifest man test $(test_units) |