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.
8 gems := rev-0.3.0 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.
13 ruby := $(HOME)/bin/ruby
14 gem_paths := $(addprefix $(HOME)/lib/ruby/gems/1.8/gems/,$(gems))
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))
25 RUBYLIB := $(subst $(sp),:,$(addsuffix /lib,$(gem_paths)))
28 # pipefail is THE reason to use bash (v3+)
29 SHELL := /bin/bash -e -o pipefail
31 full-test: test-18 test-19
33 $(MAKE) test 2>&1 | sed -u -e 's!^!1.8 !'
35 $(MAKE) test r19=t 2>&1 | sed -u -e 's!^!1.9 !'
38 @awk 'BEGIN{RS="=== ";ORS=""}NR==2{sub(/\n$$/,"");print RS""$$0 }' < $<
40 # publishes docs to http://rainbows.rubyforge.org
45 $(MAKE) -s latest > doc/LATEST
46 find doc/images doc/js -type f | \
47 TZ=UTC xargs touch -d '1970-01-01 00:00:00' doc/rdoc.css
49 chmod 644 $$(find doc -type f)
50 rsync -av --delete doc/ \
51 rubyforge.org:/var/www/gforge-projects/rainbows/
52 git ls-files | xargs touch
54 # Create gzip variants of the same timestamp as the original so nginx
55 # "gzip_static on" can serve the gzipped versions directly.
56 doc_gz: suf := html js css
57 doc_gz: docs = $(shell find doc -type f ! -regex '^.*\.\(gif\|jpg\|png\|gz\)$$')
59 touch doc/NEWS.atom.xml -d "$$(awk 'NR==1{print $$4,$$5,$$6}' NEWS)"
60 for i in $(docs); do \
61 gzip --rsyncable -9 < $$i > $$i.gz; touch -r $$i $$i.gz; done