Cleanup helper sbt targets | Use project/target/active.json for SBT timestamp
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -20,4 +20,3 @@ tags
|
|||||||
env-riscv-tools.sh
|
env-riscv-tools.sh
|
||||||
env-esp-tools.sh
|
env-esp-tools.sh
|
||||||
.bsp/
|
.bsp/
|
||||||
*_TIMESTAMP
|
|
||||||
|
|||||||
17
common.mk
17
common.mk
@@ -66,14 +66,14 @@ SBT_SOURCE_DIRS = $(addprefix $(base_dir)/,generators sims/firesim/sim tools)
|
|||||||
SBT_SOURCES = $(call lookup_srcs,$(SBT_SOURCE_DIRS),sbt) $(base_dir)/build.sbt $(base_dir)/project/plugins.sbt $(base_dir)/project/build.properties
|
SBT_SOURCES = $(call lookup_srcs,$(SBT_SOURCE_DIRS),sbt) $(base_dir)/build.sbt $(base_dir)/project/plugins.sbt $(base_dir)/project/build.properties
|
||||||
|
|
||||||
#########################################################################################
|
#########################################################################################
|
||||||
# SBT Server Setup (needed to rebuild project correctly)
|
# SBT Server Setup (start server / rebuild proj. defs. if SBT_SOURCES change)
|
||||||
#########################################################################################
|
#########################################################################################
|
||||||
$(SBT_THIN_CLIENT_TIMESTAMP): $(SBT_SOURCES)
|
$(SBT_THIN_CLIENT_TIMESTAMP): $(SBT_SOURCES)
|
||||||
ifneq (,$(wildcard $(SBT_THIN_CLIENT_TIMESTAMP)))
|
ifneq (,$(wildcard $(SBT_THIN_CLIENT_TIMESTAMP)))
|
||||||
cd $(base_dir) && $(SBT) "reload"
|
cd $(base_dir) && $(SBT) "reload"
|
||||||
touch $@
|
touch $@
|
||||||
else
|
else
|
||||||
touch $@
|
cd $(base_dir) && $(SBT) "exit"
|
||||||
endif
|
endif
|
||||||
|
|
||||||
#########################################################################################
|
#########################################################################################
|
||||||
@@ -223,18 +223,23 @@ $(dramsim_lib):
|
|||||||
$(MAKE) -C $(dramsim_dir) $(notdir $@)
|
$(MAKE) -C $(dramsim_dir) $(notdir $@)
|
||||||
|
|
||||||
################################################
|
################################################
|
||||||
# Helper to run SBT or shutdown the SBT server
|
# Helper to run SBT or manage the SBT server
|
||||||
################################################
|
################################################
|
||||||
|
|
||||||
|
SBT_COMMAND ?= shell
|
||||||
.PHONY: launch-sbt
|
.PHONY: launch-sbt
|
||||||
launch-sbt:
|
launch-sbt:
|
||||||
cd $(base_dir) && $(SBT)
|
cd $(base_dir) && $(SBT_NON_THIN) "$(SBT_COMMAND)"
|
||||||
|
|
||||||
.PHONY: shutdown-sbt
|
.PHONY: shutdown-sbt-server
|
||||||
shutdown-sbt:
|
shutdown-sbt-server:
|
||||||
cd $(base_dir) && $(SBT) "shutdown"
|
cd $(base_dir) && $(SBT) "shutdown"
|
||||||
rm -rf $(SBT_THIN_CLIENT_TIMESTAMP)
|
rm -rf $(SBT_THIN_CLIENT_TIMESTAMP)
|
||||||
|
|
||||||
|
.PHONY: start-sbt-server
|
||||||
|
start-sbt-server:
|
||||||
|
cd $(base_dir) && $(SBT) "exit"
|
||||||
|
|
||||||
#########################################################################################
|
#########################################################################################
|
||||||
# print help text
|
# print help text
|
||||||
#########################################################################################
|
#########################################################################################
|
||||||
|
|||||||
Submodule sims/firesim updated: 515ac12059...6dc98f6cff
@@ -156,7 +156,7 @@ override SBT_OPTS += -Dsbt.sourcemode=true -Dsbt.workspace=$(base_dir)/tools
|
|||||||
|
|
||||||
SCALA_BUILDTOOL_DEPS = $(SBT_SOURCES)
|
SCALA_BUILDTOOL_DEPS = $(SBT_SOURCES)
|
||||||
|
|
||||||
SBT_THIN_CLIENT_TIMESTAMP = $(base_dir)/SBT_TIMESTAMP
|
SBT_THIN_CLIENT_TIMESTAMP = $(base_dir)/project/target/active.json
|
||||||
|
|
||||||
ifdef ENABLE_SBT_THIN_CLIENT
|
ifdef ENABLE_SBT_THIN_CLIENT
|
||||||
override SCALA_BUILDTOOL_DEPS += $(SBT_THIN_CLIENT_TIMESTAMP)
|
override SCALA_BUILDTOOL_DEPS += $(SBT_THIN_CLIENT_TIMESTAMP)
|
||||||
@@ -165,6 +165,7 @@ SBT_CLIENT_FLAG = --client
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
SBT ?= java $(JAVA_OPTS) -jar $(ROCKETCHIP_DIR)/sbt-launch.jar $(SBT_OPTS) $(SBT_CLIENT_FLAG)
|
SBT ?= java $(JAVA_OPTS) -jar $(ROCKETCHIP_DIR)/sbt-launch.jar $(SBT_OPTS) $(SBT_CLIENT_FLAG)
|
||||||
|
SBT_NON_THIN ?= $(subst $(SBT_CLIENT_FLAG),,$(SBT))
|
||||||
|
|
||||||
define run_scala_main
|
define run_scala_main
|
||||||
cd $(base_dir) && $(SBT) ";project $(1); runMain $(2) $(3)"
|
cd $(base_dir) && $(SBT) ";project $(1); runMain $(2) $(3)"
|
||||||
|
|||||||
Reference in New Issue
Block a user