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.
10 # gems += unicorn-0.95.2 # installed via setup.rb
11 # gems += rainbows-0.9.0 # installed via setup.rb
13 # Avoid loading rubygems to speed up tests because gmake is
14 # fork+exec heavy with Ruby.
17 RUBY := $(prefix)/bin/ruby
18 gem_paths := $(addprefix $(prefix)/lib/ruby/gems/1.8/gems/,$(gems))
20 prefix := $(prefix)/ruby-1.9
21 export PATH := $(prefix)/bin:$(PATH)
22 RUBY := $(prefix)/bin/ruby --disable-gems
23 gem_paths := $(addprefix $(prefix)/lib/ruby/gems/1.9.1/gems/,$(gems))
29 export RUBYLIB := $(subst $(sp),:,$(addsuffix /lib,$(gem_paths)))
32 # pipefail is THE reason to use bash (v3+) or never revisions of ksh93
33 # SHELL := /bin/bash -e -o pipefail
34 SHELL := /bin/ksh93 -e -o pipefail
36 # trace execution of tests
37 # TRACER = strace -f -o $(t_pfx).strace -s 100000
38 TRACER = /usr/bin/time -v -o $(t_pfx).time
40 full-test: test-18 test-19
42 $(MAKE) test 2>&1 | sed -e 's!^!1.8 !'
44 $(MAKE) test r19=t 2>&1 | sed -e 's!^!1.9 !'
47 @awk 'BEGIN{RS="=== ";ORS=""}NR==2{sub(/\n$$/,"");print RS""$$0 }' $<
49 # publishes docs to http://rainbows.rubyforge.org/sunshowers
52 $(RM) -r doc ChangeLog NEWS
53 $(MAKE) doc LOG_VERSION=$(shell git tag -l | tail -1)
54 $(MAKE) -s latest > doc/LATEST
55 find doc/images doc/js -type f | \
56 TZ=UTC xargs touch -d '1970-01-01 00:00:00' doc/rdoc.css
58 chmod 644 $$(find doc -type f)
60 rubyforge.org:/var/www/gforge-projects/rainbows/sunshowers
61 $(RSYNC) -av doc/ dcvr:/srv/rainbows/sunshowers
62 git ls-files | xargs touch
64 # Create gzip variants of the same timestamp as the original so nginx
65 # "gzip_static on" can serve the gzipped versions directly.
66 doc_gz: docs = $(shell find doc -type f ! -regex '^.*\.\(gif\|jpg\|png\|gz\)$$')
68 touch doc/NEWS.atom.xml -d "$$(awk 'NR==1{print $$4,$$5,$$6}' NEWS)"
69 for i in $(docs); do \
70 gzip --rsyncable -9 < $$i > $$i.gz; touch -r $$i $$i.gz; done
72 # launches any of the following shells with RUBYLIB set