tests: rack.input trailer tests for all models
[rainbows.git] / local.mk.sample
blobb6867dd192743428014f2b2e8efaa3d0a2ee5a3c
1 # this is the local.mk file used by Eric Wong on his dev boxes.
2 # GNUmakefile will source local.mk in the top-level source tree
3 # if it is present.
5 # This is depends on a bunch of GNU-isms from bash, sed, touch.
7 DLEXT := so
8 gems := rev-0.3.1 rack-1.0.0 iobuffer-0.1.1
10 # Avoid loading rubygems to speed up tests because gmake is
11 # fork+exec heavy with Ruby.
12 ifeq ($(r19),)
13   ruby := $(HOME)/bin/ruby
14   gem_paths := $(addprefix $(HOME)/lib/ruby/gems/1.8/gems/,$(gems))
15 else
16   export PATH := $(HOME)/ruby-1.9/bin:$(PATH)
17   ruby := $(HOME)/ruby-1.9/bin/ruby --disable-gems
18   gems := $(gems) case-0.5 revactor-0.1.4
19   gem_paths := $(addprefix $(HOME)/ruby-1.9/lib/ruby/gems/1.9.1/gems/,$(gems))
20 endif
22 ifdef gem_paths
23   sp :=
24   sp +=
25   RUBYLIB := $(subst $(sp),:,$(addsuffix /lib,$(gem_paths)))
26 endif
28 # pipefail is THE reason to use bash (v3+) or never revisions of ksh93
29 # SHELL := /bin/bash -e -o pipefail
30 SHELL := /bin/ksh93 -e -o pipefail
32 full-test: test-18 test-19
33 test-18:
34         $(MAKE) test 2>&1 | sed -u -e 's!^!1.8 !'
35 test-19:
36         $(MAKE) test r19=t 2>&1 | sed -u -e 's!^!1.9 !'
38 latest: NEWS
39         @awk 'BEGIN{RS="=== ";ORS=""}NR==2{sub(/\n$$/,"");print RS""$$0 }' < $<
41 # publishes docs to http://rainbows.rubyforge.org
42 publish_doc:
43         -git set-file-times
44         $(RM) -r doc
45         $(MAKE) doc
46         $(MAKE) -s latest > doc/LATEST
47         find doc/images doc/js -type f | \
48                 TZ=UTC xargs touch -d '1970-01-01 00:00:00' doc/rdoc.css
49         $(MAKE) doc_gz
50         chmod 644 $$(find doc -type f)
51         rsync -av --delete doc/ \
52           rubyforge.org:/var/www/gforge-projects/rainbows/
53         git ls-files | xargs touch
55 # Create gzip variants of the same timestamp as the original so nginx
56 # "gzip_static on" can serve the gzipped versions directly.
57 doc_gz: suf := html js css
58 doc_gz: docs = $(shell find doc -type f ! -regex '^.*\.\(gif\|jpg\|png\|gz\)$$')
59 doc_gz:
60         touch doc/NEWS.atom.xml -d "$$(awk 'NR==1{print $$4,$$5,$$6}' NEWS)"
61         for i in $(docs); do \
62           gzip --rsyncable -9 < $$i > $$i.gz; touch -r $$i $$i.gz; done