2017-01-20 09:37:58 +00:00
|
|
|
ECHO=$(shell which echo) -e
|
|
|
|
RUBY=$(shell which ruby)
|
2017-02-06 14:29:40 +00:00
|
|
|
RUBY_TESTS=$(shell find ./test -maxdepth 1 -name "*.rb" -type f)
|
|
|
|
RUBY_TEST_TARGETS=$(foreach x,$(subst ,,$(RUBY_TESTS)),$(x))
|
2017-01-20 09:37:58 +00:00
|
|
|
|
2017-02-06 14:29:40 +00:00
|
|
|
all: lib
|
2017-01-20 09:37:58 +00:00
|
|
|
|
2017-02-06 14:29:40 +00:00
|
|
|
lib:
|
|
|
|
$(MAKE) -C .. libimagruby
|
2017-01-20 09:37:58 +00:00
|
|
|
|
2017-02-06 14:29:40 +00:00
|
|
|
lib-release:
|
|
|
|
$(MAKE) -C .. libimagruby-release
|
2017-01-20 09:37:58 +00:00
|
|
|
|
2017-02-06 14:29:40 +00:00
|
|
|
test: lib $(RUBY_TEST_TARGETS)
|
2017-01-20 09:37:58 +00:00
|
|
|
|
2017-02-06 14:29:40 +00:00
|
|
|
$(RUBY_TEST_TARGETS): %: lib .FORCE
|
|
|
|
@$(ECHO) "\t[TEST ]:\t$@"
|
|
|
|
@$(RUBY) $(subst -test,,$@)
|
2017-02-04 11:31:48 +00:00
|
|
|
|
2017-02-06 14:29:40 +00:00
|
|
|
.FORCE:
|