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
12 gems += iobuffer-0.1.3
14 # Avoid loading rubygems to speed up tests because gmake is
15 # fork+exec heavy with Ruby.
18 RUBY := $(prefix)/bin/ruby
19 gem_paths := $(addprefix $(prefix)/lib/ruby/gems/1.8/gems/,$(gems))
21 prefix := $(prefix)/ruby-1.9
22 export PATH := $(prefix)/bin:$(PATH)
23 RUBY := $(prefix)/bin/ruby --disable-gems
24 gem_paths := $(addprefix $(prefix)/lib/ruby/gems/1.9.1/gems/,$(gems))
30 export RUBYLIB := $(subst $(sp),:,$(addsuffix /lib,$(gem_paths)))
33 # pipefail is THE reason to use bash (v3+) or never revisions of ksh93
34 # SHELL := /bin/bash -e -o pipefail
35 SHELL := /bin/ksh93 -e -o pipefail
37 # trace execution of tests
38 # TRACER = strace -f -o $(t_pfx).strace -s 100000
39 TRACER = /usr/bin/time -v -o $(t_pfx).time
41 full-test: test-18 test-19
43 $(MAKE) test 2>&1 | sed -e 's!^!1.8 !'
45 $(MAKE) test r19=t 2>&1 | sed -e 's!^!1.9 !'
48 @awk 'BEGIN{RS="=== ";ORS=""}NR==2{sub(/\n$$/,"");print RS""$$0 }' $<
50 # publishes docs to http://lmgtwty.bogomips.org/
53 $(RM) -r doc ChangeLog NEWS
54 $(MAKE) doc LOG_VERSION=$(shell git tag -l | tail -1)
55 $(MAKE) -s latest > doc/LATEST
56 find doc/images doc/js -type f | \
57 TZ=UTC xargs touch -d '1970-01-01 00:00:00' doc/rdoc.css
59 chmod 644 $$(find doc -type f)
60 $(RSYNC) -av doc/ dcvr:/srv/lmgtwty
61 git ls-files | xargs touch
63 # Create gzip variants of the same timestamp as the original so nginx
64 # "gzip_static on" can serve the gzipped versions directly.
65 doc_gz: docs = $(shell find doc -type f ! -regex '^.*\.\(gif\|jpg\|png\|gz\)$$')
67 touch doc/NEWS.atom.xml -d "$$(awk 'NR==1{print $$4,$$5,$$6}' NEWS)"
68 for i in $(docs); do \
69 gzip --rsyncable -9 < $$i > $$i.gz; touch -r $$i $$i.gz; done
71 # launches any of the following shells with RUBYLIB set