Add Makefile for tests

This commit is contained in:
Matthias Beyer 2017-01-20 10:37:58 +01:00
parent 1c3205aa66
commit 0a25608ff0
2 changed files with 24 additions and 1 deletions

View file

@ -65,7 +65,10 @@ bin-test: $(BIN_TARGET_TESTS)
lib: $(LIB_TARGETS) lib: $(LIB_TARGETS)
@$(ECHO) "\t[ALLLIB ]" @$(ECHO) "\t[ALLLIB ]"
lib-test: $(LIB_TARGETS_TEST) lib-test: $(LIB_TARGETS_TEST) lib-imag-ruby-test
lib-imag-ruby-test:
@$(MAKE) -C imag-ruby
test: bin-test lib-test test: bin-test lib-test

20
imag-ruby/Makefile Normal file
View file

@ -0,0 +1,20 @@
ECHO=$(shell which echo) -e
RUBY=$(shell which ruby)
RUBY_TESTS=$(shell find ./test -maxdepth 1 -name "*.rb" -type f)
RUBY_TEST_TARGETS=$(foreach x,$(subst ,,$(RUBY_TESTS)),$(x))
all: lib
lib:
$(MAKE) -C .. imag-ruby
lib-release:
$(MAKE) -C .. imag-ruby-release
test: lib $(RUBY_TEST_TARGETS)
$(RUBY_TEST_TARGETS): %: lib .FORCE
@$(ECHO) "\t[TEST ]:\t$@"
@$(RUBY) $(subst -test,,$@)
.FORCE: