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
5 # This is depends on a bunch of GNU-isms from bash, sed, touch.
9 # gems += unicorn-0.93.5 # installed via setup.rb
10 gems += rev-0.3.1 iobuffer-0.1.1
11 gems += eventmachine-0.12.10
12 gems += async_sinatra-0.1.5 sinatra-0.9.4
14 # Avoid loading rubygems to speed up tests because gmake is
15 # fork+exec heavy with Ruby.
18 RUBY := $(prefix)/bin/ruby
19 gem_paths := $(addprefix $(prefix)/lib/ruby/gems/1.8/gems/,$(gems))
21 prefix := $(prefix)/ruby-1.9
22 export PATH := $(prefix)/bin:$(PATH)
23 RUBY := $(prefix)/bin/ruby --disable-gems
24 gems += case-0.5 revactor-0.1.5
25 gem_paths := $(addprefix $(prefix)/lib/ruby/gems/1.9.1/gems/,$(gems))
31 export RUBYLIB := $(subst $(sp),:,$(addsuffix /lib,$(gem_paths)))
34 # pipefail is THE reason to use bash (v3+) or never revisions of ksh93
35 # SHELL := /bin/bash -e -o pipefail
36 SHELL := /bin/ksh93 -e -o pipefail
38 # trace execution of tests
39 # TRACER = strace -f -o $(t_pfx).strace -s 100000
40 TRACER = /usr/bin/time -v -o $(t_pfx).time
42 full-test: test-18 test-19
44 $(MAKE) test 2>&1 | sed -u -e 's!^!1.8 !'
46 $(MAKE) test r19=t 2>&1 | sed -u -e 's!^!1.9 !'
49 @awk 'BEGIN{RS="=== ";ORS=""}NR==2{sub(/\n$$/,"");print RS""$$0 }' < $<
51 # publishes docs to http://rainbows.rubyforge.org
56 $(MAKE) -s latest > doc/LATEST
57 find doc/images doc/js -type f | \
58 TZ=UTC xargs touch -d '1970-01-01 00:00:00' doc/rdoc.css
60 chmod 644 $$(find doc -type f)
61 rsync -av --delete doc/ \
62 rubyforge.org:/var/www/gforge-projects/rainbows/
63 git ls-files | xargs touch
65 # Create gzip variants of the same timestamp as the original so nginx
66 # "gzip_static on" can serve the gzipped versions directly.
67 doc_gz: suf := html js css
68 doc_gz: docs = $(shell find doc -type f ! -regex '^.*\.\(gif\|jpg\|png\|gz\)$$')
70 touch doc/NEWS.atom.xml -d "$$(awk 'NR==1{print $$4,$$5,$$6}' NEWS)"
71 for i in $(docs); do \
72 gzip --rsyncable -9 < $$i > $$i.gz; touch -r $$i $$i.gz; done
74 # launches any of the following shells with RUBYLIB set