vs Unicorn: use diagrams for concurrency models
[rainbows.git] / local.mk.sample
blob5aa77009c697fcc7b925bda1edfcaf681e788e75
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 DLEXT := so
8 gems := rev-0.3.0 rack-1.0.0 iobuffer-0.1.1
10 # Avoid loading rubygems to speed up tests because gmake is
11 # fork+exec heavy with Ruby.
12 ifeq ($(r19),)
13   ruby := $(HOME)/bin/ruby
14   gem_paths := $(addprefix $(HOME)/lib/ruby/gems/1.8/gems/,$(gems))
15 else
16   export PATH := $(HOME)/ruby-1.9/bin:$(PATH)
17   ruby := $(HOME)/ruby-1.9/bin/ruby --disable-gems
18   gems := $(gems) case-0.5 revactor-0.1.4
19   gem_paths := $(addprefix $(HOME)/ruby-1.9/lib/ruby/gems/1.9.1/gems/,$(gems))
20 endif
22 ifdef gem_paths
23   sp :=
24   sp +=
25   RUBYLIB := $(subst $(sp),:,$(addsuffix /lib,$(gem_paths)))
26 endif
28 # pipefail is THE reason to use bash (v3+)
29 SHELL := /bin/bash -e -o pipefail
31 full-test: test-18 test-19
32 test-18:
33         $(MAKE) test 2>&1 | sed -u -e 's!^!1.8 !'
34 test-19:
35         $(MAKE) test r19=t 2>&1 | sed -u -e 's!^!1.9 !'
37 latest: NEWS
38         @awk 'BEGIN{RS="=== ";ORS=""}NR==2{sub(/\n$$/,"");print RS""$$0 }' < $<
40 # publishes docs to http://rainbows.rubyforge.org
41 publish_doc:
42         -git set-file-times
43         $(RM) -r doc
44         $(MAKE) doc
45         $(MAKE) -s latest > doc/LATEST
46         find doc/images doc/js -type f | \
47                 TZ=UTC xargs touch -d '1970-01-01 00:00:00' doc/rdoc.css
48         $(MAKE) doc_gz
49         chmod 644 $$(find doc -type f)
50         rsync -av --delete doc/ \
51           rubyforge.org:/var/www/gforge-projects/rainbows/
52         git ls-files | xargs touch
54 # Create gzip variants of the same timestamp as the original so nginx
55 # "gzip_static on" can serve the gzipped versions directly.
56 doc_gz: suf := html js css
57 doc_gz: docs = $(shell find doc -type f ! -regex '^.*\.\(gif\|jpg\|png\|gz\)$$')
58 doc_gz:
59         touch doc/NEWS.atom.xml -d "$$(awk 'NR==1{print $$4,$$5,$$6}' NEWS)"
60         for i in $(docs); do \
61           gzip --rsyncable -9 < $$i > $$i.gz; touch -r $$i $$i.gz; done