gemspec: remove tests that fork from test_files
[unicorn.git] / local.mk.sample
blobb229567700ed012994526349b062f1486217158a
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 rack_ver := 1.0.0
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   RUBYLIB := $(HOME)/lib/ruby/gems/1.8/gems/rack-$(rack_ver)/lib
15 else
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
19 endif
21 # pipefail is THE reason to use bash (v3+)
22 SHELL := /bin/bash -e -o pipefail
24 full-test: test-18 test-19
25 test-18:
26         $(MAKE) test test-rails 2>&1 | sed -u -e 's!^!1.8 !'
27 test-19:
28         $(MAKE) test test-rails r19=1 2>&1 | sed -u -e 's!^!1.9 !'
30 latest: NEWS
31         @awk 'BEGIN{RS="=== ";ORS=""}NR==2{sub(/\n$$/,"");print RS""$$0 }' < $<
33 # publishes docs to http://unicorn.bogomips.org
34 publish_doc:
35         -git set-file-times
36         $(RM) -r doc
37         $(MAKE) doc
38         $(MAKE) -s latest > doc/LATEST
39         find doc/images -type f | \
40                 TZ=UTC xargs touch -d '1970-01-01 00:00:00' doc/rdoc.css
41         $(MAKE) doc_gz
42         chmod 444 $$(find doc -type f)
43         rsync -av --delete doc/ dcvr:/srv/unicorn/
44         git ls-files | xargs touch
46 # Create gzip variants of the same timestamp as the original so nginx
47 # "gzip_static on" can serve the gzipped versions directly.
48 doc_gz: suf := html js css
49 doc_gz: docs = $(shell find doc -type f ! -regex '^.*\.\(gif\|jpg\|png\|gz\)$$')
50 doc_gz:
51         touch doc/NEWS.atom.xml -d "$$(awk 'NR==1{print $$4,$$5,$$6}' NEWS)"
52         for i in $(docs); do \
53           gzip --rsyncable -9 < $$i > $$i.gz; touch -r $$i $$i.gz; done