From 23c0c3babf738dd2fb08fc7b7333da899426d992 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Fri, 6 Feb 2009 17:36:06 -0800 Subject: GNUmakefile: build http11.so before running tests 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... --- .gitignore | 1 + GNUmakefile | 26 ++++++++++++++++++++++++-- 2 files changed, 25 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index b4a61a4..ccfa37f 100644 --- a/.gitignore +++ b/.gitignore @@ -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 $(