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 # Avoid loading rubygems to speed up tests because gmake is
11 # fork+exec heavy with Ruby.
16 RUBY := $(prefix)/bin/ruby
18 prefix := $(prefix)/ruby-1.9
19 export PATH := $(prefix)/bin:$(PATH)
20 RUBY := $(prefix)/bin/ruby --disable-gems
23 prefix := $(prefix)/ruby-1.9.2
24 export PATH := $(prefix)/bin:$(PATH)
25 RUBY := $(prefix)/bin/ruby --disable-gems
26 gem_paths := $(addprefix $(prefix)/lib/ruby/gems/1.9.1/gems/,$(gems))
30 x := $(shell test -d t/ && \
31 PATH=$(PATH) NO_ISOLATE=T $(MAKE) -s isolate RUBY:="$(RUBY)")
34 RUBY_VERSION := $(shell $(RUBY) -e 'puts RUBY_VERSION')
36 updir := $(shell git rev-parse --show-cdup)
37 gem_paths := $(wildcard $(updir)tmp/isolate/ruby-$(RUBY_VERSION)/gems/*-*)
42 export RUBYLIB := $(subst $(sp),:,$(addsuffix /lib,$(gem_paths)))
45 # pipefail is THE reason to use bash (v3+) or never revisions of ksh93
46 # SHELL := /bin/bash -e -o pipefail
47 SHELL := /bin/ksh93 -e -o pipefail
49 # trace execution of tests
50 # TRACER = strace -f -o $(t_pfx).strace -s 100000
51 TRACER = /usr/bin/time -v -o $(t_pfx).time
53 full-test: test-18 test-191 test-192
55 $(MAKE) test 2>&1 | sed -e 's!^!1.8 !'
57 $(MAKE) test r19=T 2>&1 | sed -e 's!^!1.9.1 !'
59 $(MAKE) test r192=T 2>&1 | sed -e 's!^!1.9.2 !'
62 @awk 'BEGIN{RS="=== ";ORS=""}NR==2{sub(/\n$$/,"");print RS""$$0 }' < $<
64 # publishes docs to http://rainbows.rubyforge.org
67 $(RM) -r doc ChangeLog NEWS
68 $(MAKE) doc LOG_VERSION=$(shell git tag -l | tail -1)
69 $(MAKE) -s latest > doc/LATEST
70 find doc/images doc/js -type f | \
71 TZ=UTC xargs touch -d '1970-01-01 00:00:00' doc/rdoc.css
73 chmod 644 $$(find doc -type f)
74 $(RSYNC) -av doc/ rubyforge.org:/var/www/gforge-projects/rainbows/
75 $(RSYNC) -av doc/ dcvr:/srv/rainbows/
76 git ls-files | xargs touch
78 # Create gzip variants of the same timestamp as the original so nginx
79 # "gzip_static on" can serve the gzipped versions directly.
80 doc_gz: docs = $(shell find doc -type f ! -regex '^.*\.\(gif\|jpg\|png\|gz\)$$')
82 touch doc/NEWS.atom.xml -d "$$(awk 'NR==1{print $$4,$$5,$$6}' NEWS)"
83 for i in $(docs); do \
84 gzip --rsyncable -9 < $$i > $$i.gz; touch -r $$i $$i.gz; done
86 # launches any of the following shells with RUBYLIB set