summary refs log tree commit homepage
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2010-06-08 08:29:04 +0000
committerEric Wong <normalperson@yhbt.net>2010-06-08 08:29:04 +0000
commit524f57bc1d5334a50bff0340e8b1c541fa6536e4 (patch)
tree96f6ae1b1188bc4a201b96eb5b6e741e59bbbce9
parent9afe763e3b33cf344908c5831c26f3f925acf368 (diff)
The publish_doc target belongs in main, since other people
may update the website.

local.mk.sample enables a subset of tests for Rubinius
and allows them to run in parallel with the MRI tests.

And it was NOT a UUoC after all, there are multiple files to
aggregate :x
-rw-r--r--GNUmakefile26
-rw-r--r--local.mk.sample68
2 files changed, 56 insertions, 38 deletions
diff --git a/GNUmakefile b/GNUmakefile
index 05f139d..ab0a118 100644
--- a/GNUmakefile
+++ b/GNUmakefile
@@ -4,7 +4,6 @@ all:: test
 GIT_URL = git://git.bogomips.org/unicorn.git
 RLFLAGS = -G2
 
-# lower-case vars are deprecated
 MRI = ruby
 RUBY = ruby
 RAKE = rake
@@ -77,7 +76,7 @@ shebang: $(bins)
 
 t_log := $(T_log) $(T_n_log)
 test: $(T) $(T_n)
-        @$(MRI) test/aggregate.rb < $(t_log)
+        @cat $(t_log) | $(MRI) test/aggregate.rb
         @$(RM) $(t_log)
 
 test-exec: $(wildcard test/exec/test_*.rb)
@@ -210,6 +209,29 @@ doc: .document $(ext)/unicorn_http.c NEWS ChangeLog
         cd doc && ln README.html tmp && mv tmp index.html
         $(RM) $(man1_rdoc)
 
+# publishes docs to http://unicorn.bogomips.org
+publish_doc:
+        -git set-file-times
+        $(RM) -r doc ChangeLog NEWS
+        $(MAKE) doc LOG_VERSION=$(shell git tag -l | tail -1)
+        @awk 'BEGIN{RS="=== ";ORS=""}NR==2{sub(/\n$$/,"");print RS""$$0 }' \
+         < NEWS > doc/LATEST
+        find doc/images doc/js -type f | \
+                TZ=UTC xargs touch -d '1970-01-01 00:00:00' doc/rdoc.css
+        $(MAKE) doc_gz
+        tar cf - $$(git ls-files examples/) | (cd doc && tar xf -)
+        chmod 644 $$(find doc -type f)
+        rsync -av doc/ unicorn.bogomips.org:/srv/unicorn/
+        git ls-files | xargs touch
+
+# Create gzip variants of the same timestamp as the original so nginx
+# "gzip_static on" can serve the gzipped versions directly.
+doc_gz: docs = $(shell find doc -type f ! -regex '^.*\.\(gif\|jpg\|png\|gz\)$$')
+doc_gz:
+        touch doc/NEWS.atom.xml -d "$$(awk 'NR==1{print $$4,$$5,$$6}' NEWS)"
+        for i in $(docs); do \
+          gzip --rsyncable -9 < $$i > $$i.gz; touch -r $$i $$i.gz; done
+
 rails_git_url = git://github.com/rails/rails.git
 rails_git := vendor/rails.git
 $(rails_git)/info/cloned-stamp:
diff --git a/local.mk.sample b/local.mk.sample
index 5019576..8dc68d3 100644
--- a/local.mk.sample
+++ b/local.mk.sample
@@ -5,22 +5,34 @@
 # This is depends on a bunch of GNU-isms from bash, sed, touch.
 
 DLEXT := so
-gems := rack-1.1.0
 
 # Avoid loading rubygems to speed up tests because gmake is
 # fork+exec heavy with Ruby.
 prefix = $(HOME)
-ifeq ($(r19),)
-  RUBY := $(prefix)/bin/ruby
-  gem_paths := $(addprefix $(prefix)/lib/ruby/gems/1.8/gems/,$(gems))
+ifeq ($(r192),)
+  ifeq ($(r19),)
+    ifeq ($(rbx),)
+      RUBY := $(prefix)/bin/ruby
+    else
+      prefix := $(prefix)/rbx
+      export PATH := $(prefix)/bin:$(PATH)
+      RUBY := $(prefix)/bin/rbx
+    endif
+  else
+    prefix := $(prefix)/ruby-1.9
+    export PATH := $(prefix)/bin:$(PATH)
+    RUBY := $(prefix)/bin/ruby --disable-gems
+  endif
 else
-  prefix := $(prefix)/ruby-1.9
+  prefix := $(prefix)/ruby-1.9.2
   export PATH := $(prefix)/bin:$(PATH)
   RUBY := $(prefix)/bin/ruby --disable-gems
-  gem_paths := $(addprefix $(prefix)/lib/ruby/gems/1.9.1/gems/,$(gems))
 endif
 
-ifdef gem_paths
+# FIXME: use isolate more
+ifndef RUBYLIB
+  gems := rack-1.1.0
+  gem_paths := $(addprefix $(HOME)/lib/ruby/gems/1.8/gems/,$(gems))
   sp :=
   sp +=
   export RUBYLIB := $(subst $(sp),:,$(addsuffix /lib,$(gem_paths)))
@@ -30,33 +42,17 @@ endif
 # SHELL := /bin/bash -e -o pipefail
 SHELL := /bin/ksh93 -e -o pipefail
 
-full-test: test-18 test-19
-test-18:
-        $(MAKE) test test-rails 2>&1 | sed -e 's!^!1.8 !'
-test-19:
-        $(MAKE) test test-rails r19=1 2>&1 | sed -e 's!^!1.9 !'
-
-latest: NEWS
-        @awk 'BEGIN{RS="=== ";ORS=""}NR==2{sub(/\n$$/,"");print RS""$$0 }' < $<
+full-test: test-18 test-191 test-192 test-rbx
 
-# publishes docs to http://unicorn.bogomips.org
-publish_doc:
-        -git set-file-times
-        $(RM) -r doc ChangeLog NEWS
-        $(MAKE) doc LOG_VERSION=$(shell git tag -l | tail -1)
-        $(MAKE) -s latest > doc/LATEST
-        find doc/images doc/js -type f | \
-                TZ=UTC xargs touch -d '1970-01-01 00:00:00' doc/rdoc.css
-        $(MAKE) doc_gz
-        tar cf - $$(git ls-files examples/) | (cd doc && tar xf -)
-        chmod 644 $$(find doc -type f)
-        rsync -av doc/ dcvr:/srv/unicorn/
-        git ls-files | xargs touch
-
-# Create gzip variants of the same timestamp as the original so nginx
-# "gzip_static on" can serve the gzipped versions directly.
-doc_gz: docs = $(shell find doc -type f ! -regex '^.*\.\(gif\|jpg\|png\|gz\)$$')
-doc_gz:
-        touch doc/NEWS.atom.xml -d "$$(awk 'NR==1{print $$4,$$5,$$6}' NEWS)"
-        for i in $(docs); do \
-          gzip --rsyncable -9 < $$i > $$i.gz; touch -r $$i $$i.gz; done
+# FIXME: keep eye on Rubinius activity and wait for fixes from upstream
+# so we don't need RBX_SKIP anymore
+test-rbx: export RBX_SKIP := 1
+test-rbx: export RUBY := $(RUBY)
+test-rbx:
+        $(MAKE) test test-integration rbx=T 2>&1 |sed -e 's!^!rbx !'
+test-18:
+        $(MAKE) test-all 2>&1 |sed 's!^!1.8 !'
+test-191:
+        $(MAKE) test-all r19=1 2>&1 |sed 's!^!1.9.1 !'
+test-192:
+        $(MAKE) test-all r192=1 2>&1 |sed 's!^!1.9.2 !'