1 # this is a sample local.mk file, feel free to modify it for your needs
2 # GNUmakefile will source local.mk in the top-level source tree
5 # This is depends on a bunch of GNU-isms from bash, touch.
11 # Avoid loading rubygems to speed up tests because gmake is
12 # fork+exec heavy with Ruby.
15 RUBY := $(prefix)/bin/ruby
16 gem_paths := $(addprefix $(prefix)/lib/ruby/gems/1.8/gems/,$(gems))
18 prefix := $(prefix)/ruby-1.9
19 export PATH := $(prefix)/bin:$(PATH)
20 RUBY := $(prefix)/bin/ruby --disable-gems
21 gem_paths := $(addprefix $(prefix)/lib/ruby/gems/1.9.1/gems/,$(gems))
27 export RUBYLIB := $(subst $(sp),:,$(addsuffix /lib,$(gem_paths)))
30 # pipefail is THE reason to use bash (v3+) or never revisions of ksh93
31 # SHELL := /bin/bash -e -o pipefail
32 SHELL := /bin/ksh93 -e -o pipefail
34 # trace execution of tests
35 # TRACER = strace -f -o $(t_pfx).strace -s 100000
36 TRACER = /usr/bin/time -v -o $(t_pfx).time
38 full-test: test-18 test-19
40 $(MAKE) test 2>&1 | sed -e 's!^!1.8 !'
42 $(MAKE) test r19=t 2>&1 | sed -e 's!^!1.9 !'
45 @awk 'BEGIN{RS="=== ";ORS=""}NR==2{sub(/\n$$/,"");print RS""$$0 }' $<
47 # publishes docs to http://bogomips.org/ruby_posix_mq/
50 $(RM) -r doc ChangeLog NEWS
51 $(MAKE) doc LOG_VERSION=$(shell git tag -l | tail -1)
52 $(MAKE) -s latest > doc/LATEST
53 find doc/images doc/js -type f | \
54 TZ=UTC xargs touch -d '1970-01-01 00:00:00' doc/rdoc.css
56 chmod 644 $$(find doc -type f)
57 $(RSYNC) -av doc/ dcvr:/srv/bogomips/ruby_posix_mq/
58 git ls-files | xargs touch
60 # Create gzip variants of the same timestamp as the original so nginx
61 # "gzip_static on" can serve the gzipped versions directly.
62 doc_gz: docs = $(shell find doc -type f ! -regex '^.*\.\(gif\|jpg\|png\|gz\)$$')
64 touch doc/NEWS.atom.xml -d "$$(awk 'NR==1{print $$4,$$5,$$6}' NEWS)"
65 for i in $(docs); do \
66 gzip --rsyncable -9 < $$i > $$i.gz; touch -r $$i $$i.gz; done
68 # launches any of the following shells with RUBYLIB set