diff options
author | Eric Wong <normalperson@yhbt.net> | 2009-02-06 17:36:06 -0800 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2009-02-09 19:51:45 -0800 |
commit | 23c0c3babf738dd2fb08fc7b7333da899426d992 (patch) | |
tree | 2234114b34acb4fc855fec8ec49b987b88fb19aa | |
parent | b1346861133517b939684d2e6eb62ef694b1062f (diff) | |
download | unicorn-23c0c3babf738dd2fb08fc7b7333da899426d992.tar.gz |
Running Rake is too slow for me to do builds on, and I don't have net access to install the Echoe gem at the moment for Ruby 1.9...
-rw-r--r-- | .gitignore | 1 | ||||
-rw-r--r-- | GNUmakefile | 26 |
2 files changed, 25 insertions, 2 deletions
@@ -9,3 +9,4 @@ test_stderr.log test_stdout.log .DS_Store *.so +/local.mk diff --git a/GNUmakefile b/GNUmakefile index 457d30d..79ed355 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -1,5 +1,9 @@ # use GNU Make to run tests in parallel, and without depending on Rubygems all:: test +-include local.mk +ifeq ($(DLEXT),) # "so" for Linux + DLEXT := $(shell ruby -rrbconfig -e 'puts Config::CONFIG["DLEXT"]') +endif slow_tests := test/unit/test_server.rb awk_slow := awk '/def test_/{print FILENAME"--"$$2".n"}' @@ -11,9 +15,27 @@ $(slow_tests): @$(MAKE) $(shell $(awk_slow) $@) %.n: arg = $(subst .n,,$(subst --, -n ,$@)) %.n: name = $(subst .n,,$(subst --, ,$@)) -%.n: +%.n: lib/http11.$(DLEXT) @echo '**** $(name) ****'; ruby -I lib $(arg) $(TEST_OPTS) -$(T): +$(T): lib/http11.$(DLEXT) @echo '**** $@ ****'; ruby -I lib $@ $(TEST_OPTS) +http11_deps := $(addprefix ext/http11/, \ + ext_help.h http11.c http11_parser.c http11_parser.h \ + http11_parser.rl http11_parser_common.rl \ + Makefile) +ext/http11/http11_parser.c: ext/http11/http11_parser.rl + cd $(@D) && ragel $(<F) -C -G2 -o $(@F) +ext/http11/Makefile: ext/http11/extconf.rb + cd $(@D) && ruby $(<F) +ext/http11/http11.$(DLEXT): $(http11_deps) + $(MAKE) -C $(@D) +lib/http11.$(DLEXT): ext/http11/http11.$(DLEXT) + @mkdir -p lib + install -m644 $< $@ + +clean: + -$(MAKE) -C ext/http11 clean + $(RM) ext/http11/Makefile lib/http11.$(DLEXT) + .PHONY: $(T) $(slow_tests) |