summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Beyer <mail@beyermatthias.de>2017-02-04 12:31:48 +0100
committerMatthias Beyer <mail@beyermatthias.de>2017-04-21 21:09:09 +0200
commite290d4fa9831db51a016b86f9f5da3b63a0d3081 (patch)
tree65a2e6f9e1fc5b6165ed0dcb56927d8022d7202f
parentb35e942df6660daab1208e9ebf13d28f80c9e6fe (diff)
downloadimag-e290d4fa9831db51a016b86f9f5da3b63a0d3081.zip
imag-e290d4fa9831db51a016b86f9f5da3b63a0d3081.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 9d10436..b46a852 100644
--- a/Makefile
+++ b/Makefile
@@ -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]"
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
+