summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Beyer <mail@beyermatthias.de>2017-02-04 12:31:48 +0100
committerMatthias Beyer <mail@beyermatthias.de>2017-02-06 07:11:06 +0100
commit77566bc7a5b39db78fd23e7f13e8aef0290cef4f (patch)
tree95ca1a04c4bfffffcc41c131954f7e3e4cb7b9e7
parent980d5222bea16fd77cf45e0b9dd7c692874f0982 (diff)
downloadimag-77566bc7a5b39db78fd23e7f13e8aef0290cef4f.zip
imag-77566bc7a5b39db78fd23e7f13e8aef0290cef4f.tar.gz
Add Makefile setup for building libimagruby + thermite bundling
-rw-r--r--Makefile4
-rw-r--r--libimagruby/Makefile26
2 files changed, 16 insertions, 14 deletions
diff --git a/Makefile b/Makefile
index e47c0c1..42f629f 100644
--- a/Makefile
+++ b/Makefile
@@ -68,9 +68,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]"
diff --git a/libimagruby/Makefile b/libimagruby/Makefile
index f7ed82d..f597909 100644
--- a/libimagruby/Makefile
+++ b/libimagruby/Makefile
@@ -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
+