Add Makefile setup for building libimagruby + thermite bundling

This commit is contained in:
Matthias Beyer 2017-02-04 12:31:48 +01:00
parent b35e942df6
commit e290d4fa98
2 changed files with 16 additions and 14 deletions

View file

@ -53,9 +53,9 @@ lib: $(LIB_TARGETS)
lib-test: $(LIB_TARGETS_TEST)
lib-imag-ruby-test:
@$(MAKE) -C libimagruby
@$(MAKE) -C libimagruby test
test: bin-test lib-test
test: bin-test lib-test lib-imag-ruby-test
install: $(INSTALL_TARGETS) imag-bin-install
@$(ECHO) "\t[INSTALL]"

View file

@ -1,20 +1,22 @@
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))
BUNDLE=$(shell which bundle)
all: lib
all:
@$(ECHO) "There is no default target here"
lib:
$(MAKE) -C .. libimagruby
bundle:
@$(ECHO) "[BUNDLE]"
@$(BUNDLE) install --path vendor/bundle
lib-release:
$(MAKE) -C .. libimagruby-release
bundle-rake-thermite-test:
@$(ECHO) "[RAKE ][thermite]"
@CARGO_TARGET=debug $(BUNDLE) exec rake thermite:tarball
test: lib $(RUBY_TEST_TARGETS)
$(RUBY_TEST_TARGETS): %: lib .FORCE
@$(ECHO) "\t[TEST ]:\t$@"
@$(RUBY) $(subst -test,,$@)
test: lib bundle-rake-thermite-test
@$(ECHO) "[TEST ]"
.FORCE:
.PHONY: all