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
37 $(MAKE) -s latest > doc/LATEST
39 rsync -av --delete doc/ dcvr:/srv/unicorn/
40 git ls-files | xargs touch
42 # Create gzip variants of the same timestamp as the original so nginx
43 # "gzip_static on" can serve the gzipped versions directly.
44 doc_gz: suf := html js css
45 doc_gz: docs = $(shell find doc -type f ! -regex '^.*\.\(gif\|jpg\|png\|gz\)$$')
47 touch doc/NEWS.atom.xml -d "$$(awk 'NR==1{print $$4,$$5,$$6}' NEWS)"
48 for i in $(docs); do \
49 gzip --rsyncable -9 < $$i > $$i.gz; touch -r $$i $$i.gz; done