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.
13 ruby := $(HOME)/bin/ruby
14 RUBYLIB := $(HOME)/lib/ruby/gems/1.8/gems/rack-$(rack_ver)/lib
16 export PATH := $(HOME)/ruby-1.9/bin:$(PATH)
17 ruby := $(HOME)/ruby-1.9/bin/ruby --disable-gems
18 RUBYLIB := $(HOME)/ruby-1.9/lib/ruby/gems/1.9.1/gems/rack-$(rack_ver)/lib
21 # pipefail is THE reason to use bash (v3+)
22 SHELL := /bin/bash -e -o pipefail
24 full-test: test-18 test-19
26 $(MAKE) test test-rails 2>&1 | sed -u -e 's!^!1.8 !'
28 $(MAKE) test test-rails r19=1 2>&1 | sed -u -e 's!^!1.9 !'
31 @awk 'BEGIN{RS="=== ";ORS=""}NR==2{sub(/\n$$/,"");print RS""$$0 }' < $<
33 # publishes docs to http://unicorn.bogomips.org
38 $(MAKE) -s latest > doc/LATEST
39 find doc/images doc/js -type f | \
40 TZ=UTC xargs touch -d '1970-01-01 00:00:00' doc/rdoc.css
42 chmod 644 $$(find doc -type f)
43 rsync -av --delete doc/ dcvr:/srv/unicorn/
44 git ls-files | xargs touch
46 # Create gzip variants of the same timestamp as the original so nginx
47 # "gzip_static on" can serve the gzipped versions directly.
48 doc_gz: suf := html js css
49 doc_gz: docs = $(shell find doc -type f ! -regex '^.*\.\(gif\|jpg\|png\|gz\)$$')
51 touch doc/NEWS.atom.xml -d "$$(awk 'NR==1{print $$4,$$5,$$6}' NEWS)"
52 for i in $(docs); do \
53 gzip --rsyncable -9 < $$i > $$i.gz; touch -r $$i $$i.gz; done