X-Git-Url: https://git.hcoop.net/jackhill/mal.git/blobdiff_plain/90f618cbe7ac7740accf501a75be6972bd95be1a..f87ea3e7419ec3f4d53acc3e5807e11618b2784f:/scala/Makefile diff --git a/scala/Makefile b/scala/Makefile index 29dd8aa5..12ca5b83 100644 --- a/scala/Makefile +++ b/scala/Makefile @@ -1,20 +1,23 @@ -TESTS = - SOURCES_BASE = types.scala reader.scala printer.scala SOURCES_LISP = env.scala core.scala stepA_mal.scala SOURCES = $(SOURCES_BASE) $(SOURCES_LISP) -#all: mal.scala +TARGET_DIR=target/scala-2.11 + +all: $(TARGET_DIR)/mal.jar + +dist: mal + +mal: $(TARGET_DIR)/mal.jar + cp $< $@ -.PHONY: stats tests $(TESTS) +$(TARGET_DIR)/mal.jar: + sbt assembly -stats: $(SOURCES) - @wc $^ -stats-lisp: $(SOURCES_LISP) - @wc $^ +$(TARGET_DIR)/classes/step%.class: step%.scala $(SOURCES) + sbt assembly -tests: $(TESTS) +clean: + rm -rf mal target -$(TESTS): - @echo "Running $@"; \ - ruby $@ || exit 1; \ +.PHONY: all dist clean