diff --git a/Makefile b/Makefile index 719c0219..0dfea68c 100644 --- a/Makefile +++ b/Makefile @@ -65,7 +65,10 @@ bin-test: $(BIN_TARGET_TESTS) lib: $(LIB_TARGETS) @$(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 diff --git a/imag-ruby/Makefile b/imag-ruby/Makefile new file mode 100644 index 00000000..805b9a27 --- /dev/null +++ b/imag-ruby/Makefile @@ -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: