Helper make target to launch SBT | Move SBT_OPTS to SBT variable

This commit is contained in:
abejgonzalez
2020-11-20 16:09:07 -08:00
parent c6e49e0716
commit 6f827456c8
2 changed files with 13 additions and 4 deletions

View File

@@ -218,6 +218,14 @@ dramsim_lib = $(dramsim_dir)/libdramsim.a
$(dramsim_lib):
$(MAKE) -C $(dramsim_dir) $(notdir $@)
#######################################
# Helper to run SBT #
#######################################
.PHONY: launch-sbt
launch-sbt:
cd $(base_dir) && $(SBT)
#########################################################################################
# print help text
#########################################################################################

View File

@@ -151,9 +151,6 @@ JAVA_ARGS ?= -Xmx$(JAVA_HEAP_SIZE) -Xss8M -XX:MaxPermSize=256M
#########################################################################################
# default sbt launch command
#########################################################################################
SCALA_VERSION=2.12.10
SCALA_VERSION_MAJOR=$(basename $(SCALA_VERSION))
SBT ?= java $(JAVA_ARGS) -jar $(ROCKETCHIP_DIR)/sbt-launch.jar
# Running with sbt-launch.jar doesn't read .sbtopts by default
# # Set if the file exists (if it exists, we're building chisel3 and firrtl from source)
sbtopts_file := $(base_dir)/.sbtopts
@@ -161,6 +158,10 @@ ifneq (,$(wildcard $(sbtopts_file)))
SBT_OPTS ?= $(shell cat $(sbtopts_file))
endif
SCALA_VERSION=2.12.10
SCALA_VERSION_MAJOR=$(basename $(SCALA_VERSION))
SBT ?= java $(JAVA_ARGS) -jar $(ROCKETCHIP_DIR)/sbt-launch.jar $(SBT_OPTS)
BLOOP ?= bloop
BLOOP_CONFIG_DIR ?= $(base_dir)/.bloop
# This mirrors the bloop default. Set to a system-unique port in a multi-user environment
@@ -182,7 +183,7 @@ define run_scala_main
endef
else
define run_scala_main
cd $(base_dir) && $(SBT) $(SBT_OPTS) "project $(1)" "runMain $(2) $(3)"
cd $(base_dir) && $(SBT) "project $(1)" "runMain $(2) $(3)"
endef
endif