gemspec: update comments for gem dependencies
[rainbows.git] / local.mk.sample
blob1bd8832e7dffe591cf18cc4c3e6e9178d435461e
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
3 # if it is present.
5 # This is depends on a bunch of GNU-isms from bash, sed, touch.
7 RSYNC = rsync
8 DLEXT := so
10 # Avoid loading rubygems to speed up tests because gmake is
11 # fork+exec heavy with Ruby.
12 prefix = $(HOME)
14 ifeq ($(r19),)
15   RUBY := $(prefix)/bin/ruby
16 else
17   prefix := $(prefix)/ruby-1.9
18   export PATH := $(prefix)/bin:$(PATH)
19   RUBY := $(prefix)/bin/ruby --disable-gems
20 endif
22 ifndef NO_ISOLATE
23   x := $(shell test -d t/ && NO_ISOLATE=T $(MAKE) -s isolate RUBY:="$(RUBY)")
24 endif
26 RUBY_VERSION := $(shell $(RUBY) -e 'puts RUBY_VERSION')
28 updir := $(shell git rev-parse --show-cdup)
29 gem_paths := $(wildcard $(updir)tmp/gems/$(RUBY_VERSION)/gems/*-*)
31 ifdef gem_paths
32   sp :=
33   sp +=
34   export RUBYLIB := $(subst $(sp),:,$(addsuffix /lib,$(gem_paths)))
35 endif
37 # pipefail is THE reason to use bash (v3+) or never revisions of ksh93
38 # SHELL := /bin/bash -e -o pipefail
39 SHELL := /bin/ksh93 -e -o pipefail
41 # trace execution of tests
42 # TRACER = strace -f -o $(t_pfx).strace -s 100000
43 TRACER = /usr/bin/time -v -o $(t_pfx).time
45 full-test: test-18 test-19
46 test-18:
47         $(MAKE) test 2>&1 | sed -e 's!^!1.8 !'
48 test-19:
49         $(MAKE) test r19=T 2>&1 | sed -e 's!^!1.9 !'
51 latest: NEWS
52         @awk 'BEGIN{RS="=== ";ORS=""}NR==2{sub(/\n$$/,"");print RS""$$0 }' < $<
54 # publishes docs to http://rainbows.rubyforge.org
55 publish_doc:
56         -git set-file-times
57         $(RM) -r doc ChangeLog NEWS
58         $(MAKE) doc LOG_VERSION=$(shell git tag -l | tail -1)
59         $(MAKE) -s latest > doc/LATEST
60         find doc/images doc/js -type f | \
61                 TZ=UTC xargs touch -d '1970-01-01 00:00:00' doc/rdoc.css
62         $(MAKE) doc_gz
63         chmod 644 $$(find doc -type f)
64         $(RSYNC) -av doc/ rubyforge.org:/var/www/gforge-projects/rainbows/
65         $(RSYNC) -av doc/ dcvr:/srv/rainbows/
66         git ls-files | xargs touch
68 # Create gzip variants of the same timestamp as the original so nginx
69 # "gzip_static on" can serve the gzipped versions directly.
70 doc_gz: docs = $(shell find doc -type f ! -regex '^.*\.\(gif\|jpg\|png\|gz\)$$')
71 doc_gz:
72         touch doc/NEWS.atom.xml -d "$$(awk 'NR==1{print $$4,$$5,$$6}' NEWS)"
73         for i in $(docs); do \
74           gzip --rsyncable -9 < $$i > $$i.gz; touch -r $$i $$i.gz; done
76 # launches any of the following shells with RUBYLIB set
77 irb sh bash ksh:
78         $@