diff options
author | Eric Wong <normalperson@yhbt.net> | 2010-06-05 20:57:17 +0000 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2010-06-06 00:04:24 +0000 |
commit | e4c3548e8ff4c95c697b4a30699e6f655d60f188 (patch) | |
tree | 5594d44279122a68f794aa37bef94ee077b867f6 | |
parent | 111e5ac0bf12021a2b8cf9145df59312f1f96992 (diff) | |
download | clogger-e4c3548e8ff4c95c697b4a30699e6f655d60f188.tar.gz |
-rw-r--r-- | GNUmakefile | 20 |
1 files changed, 17 insertions, 3 deletions
diff --git a/GNUmakefile b/GNUmakefile index 56cb0d9..549de27 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -22,11 +22,24 @@ clean: -$(MAKE) -C ext/clogger_ext clean $(RM) ext/clogger_ext/Makefile lib/clogger_ext.$(DLEXT) -test-ext: ext/clogger_ext/clogger.$(DLEXT) - $(RUBY) -Iext/clogger_ext:lib test/test_clogger.rb +test_unit := $(wildcard test/test_*.rb) +test-unit: $(test_unit) + +ifeq ($(CLOGGER_PURE),) +$(test_unit): export RUBYLIB := ext/clogger_ext:lib +$(test_unit): ext/clogger_ext/clogger.$(DLEXT) +else +$(test_unit): export RUBYLIB := lib +endif + +$(test_unit): + $(RUBY) $@ + +test-ext: + $(MAKE) test-unit test-pure: - CLOGGER_PURE=t $(RUBY) -Ilib test/test_clogger.rb + CLOGGER_PURE=t $(MAKE) test-unit test: test-ext test-pure @@ -145,3 +158,4 @@ gem install-gem: GIT-VERSION-FILE endif .PHONY: .FORCE-GIT-VERSION-FILE test doc manifest +.PHONY: test test-ext test-pure $(test_unit) |