aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorJim Lawson2016-04-07 12:17:47 -0700
committerjackkoenig2016-04-09 19:07:47 -0700
commit084e7ca9f9ecb76b91e143931d08195d45672ab7 (patch)
tree15e5c81fb9c81fc5e0508718da54b2f180b46e45 /Makefile
parentf93dc6831e282338bcda1db04dbf272a36b4a895 (diff)
Update Makefile to use sbt to determine sources; make build-scala the default build - #97
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile33
1 files changed, 13 insertions, 20 deletions
diff --git a/Makefile b/Makefile
index 827211fb..29534b83 100644
--- a/Makefile
+++ b/Makefile
@@ -4,12 +4,15 @@ regress_dir ?= $(root_dir)/regress
firrtl_dir ?= $(root_dir)/src/main/stanza
install_dir ?= $(root_dir)/utils/bin
+sbt ?= sbt
stanza ?= $(install_dir)/stanza
stanza_bin ?= $(install_dir)/firrtl-stanza
scala_jar ?= $(install_dir)/firrtl.jar
-scala_src=$(shell ls src/main/scala/firrtl/*.scala)
+# The following is slow but accurate.
+# We use 'unmanaged' so we don't include source files generated by the
+# build itself (otherwise, we'd need to include the rules to build them).
+scala_src := $(shell $(sbt) "show compile:unmanaged-sources compile:unmanaged-resources" | ./sourcesFromSbt.sh )
stanza_src=$(shell ls src/main/stanza/*.stanza)
-sbt ?= sbt
all-noise:
${MAKE} all || ${MAKE} fail
@@ -34,27 +37,18 @@ $(stanza): $(root_dir)/src/lib/stanza/stamp $(root_dir)/utils/stanza-wrapper
$(stanza_bin): $(stanza) $(stanza_src)
cd $(firrtl_dir) && $(stanza) -i firrtl-test-main.stanza -o $@
-build-deploy: $(stanza)
- cd $(firrtl_dir) && $(stanza) -i firrtl-main.stanza -o $(install_dir)/firrtl
-
-build: $(stanza)
- cd $(firrtl_dir) && $(stanza) -i firrtl-test-main.stanza -o $(install_dir)/firrtl
-
-build-fast: $(stanza)
- cd $(firrtl_dir) && $(stanza) -i firrtl-test-main.stanza -o $(install_dir)/firrtl -flags OPTIMIZE
-
-build-deploy:
- cd $(firrtl_dir) && $(stanza) -i firrtl-main.stanza -o $(install_dir)/firrtl-stanza
- $(MAKE) set-stanza
-
-build:
+build-stanza: $(stanza)
cd $(firrtl_dir) && $(stanza) -i firrtl-test-main.stanza -o $(install_dir)/firrtl-stanza
$(MAKE) set-stanza
-build-fast:
+build-fast: $(stanza)
cd $(firrtl_dir) && $(stanza) -i firrtl-test-main.stanza -o $(install_dir)/firrtl-stanza -flags OPTIMIZE
$(MAKE) set-stanza
+build-deploy: $(stanza)
+ cd $(firrtl_dir) && $(stanza) -i firrtl-main.stanza -o $(install_dir)/firrtl-stanza
+ $(MAKE) set-stanza
+
check:
cd $(test_dir) && lit -j 2 -v . --path=$(install_dir)/
@@ -73,9 +67,6 @@ jack:
passes:
cd $(test_dir)/passes && lit -v . --path=$(install_dir)/
-perf:
- cd $(test_dir)/performance && lit -v . --path=$(install_dir)/
-
errors:
cd $(test_dir)/errors && lit -v . --path=$(install_dir)/
@@ -114,6 +105,8 @@ done: build-fast check regress
fail:
say "fail"
+build: build-scala
+
# Scala Added Makefile commands
build-scala: $(scala_jar)