From 03e82779f7841b593300c722f015d9c839bbef71 Mon Sep 17 00:00:00 2001 From: David Biancolin Date: Fri, 26 Jun 2020 22:50:13 -0700 Subject: [PATCH] [make] Add Scala build tool deps to target elaboration recipes --- sim/Makefile | 3 ++- sim/src/main/makefrag/fasedtests/Makefrag | 2 +- sim/src/main/makefrag/firesim/Makefrag | 2 +- sim/src/main/makefrag/midasexamples/Makefrag | 2 +- 4 files changed, 5 insertions(+), 4 deletions(-) diff --git a/sim/Makefile b/sim/Makefile index 4651abd0..1e92eb83 100644 --- a/sim/Makefile +++ b/sim/Makefile @@ -68,7 +68,8 @@ endif ######################### # Bloop Project Defs # ######################### -$(BLOOP_CONFIG_DIR)/TIMESTAMP: build.sbt +sbt_sources = $(shell find -L $(base_dir) -name target -prune -o -iname "*.sbt" -print 2> /dev/null) +$(BLOOP_CONFIG_DIR)/TIMESTAMP: $(sbt_sources) cd $(base_dir) && $(SBT) "project $(firesim_sbt_project)" "bloopInstall" touch $@ diff --git a/sim/src/main/makefrag/fasedtests/Makefrag b/sim/src/main/makefrag/fasedtests/Makefrag index 6166080c..3f1d39c3 100644 --- a/sim/src/main/makefrag/fasedtests/Makefrag +++ b/sim/src/main/makefrag/fasedtests/Makefrag @@ -38,7 +38,7 @@ chisel_src_dirs = \ chisel_srcs = $(foreach submodule,$(chisel_src_dirs),\ $(shell find $(submodule)/ -iname "[!.]*.scala" -print 2> /dev/null | grep 'src/main/scala')) -$(FIRRTL_FILE) $(ANNO_FILE): $(chisel_srcs) $(FIRRTL_JAR) +$(FIRRTL_FILE) $(ANNO_FILE): $(chisel_srcs) $(FIRRTL_JAR) $(SCALA_BUILDTOOL_DEPS) mkdir -p $(@D) $(call run_scala_main,$(firesim_sbt_project),chipyard.Generator, \ --target-dir $(GENERATED_DIR) \ diff --git a/sim/src/main/makefrag/firesim/Makefrag b/sim/src/main/makefrag/firesim/Makefrag index 948082ff..be155c17 100644 --- a/sim/src/main/makefrag/firesim/Makefrag +++ b/sim/src/main/makefrag/firesim/Makefrag @@ -39,7 +39,7 @@ else firesim_sbt_project := firechip endif -$(FIRRTL_FILE) $(ANNO_FILE): $(SCALA_SOURCES) $(FIRRTL_JAR) +$(FIRRTL_FILE) $(ANNO_FILE): $(SCALA_SOURCES) $(FIRRTL_JAR) $(SCALA_BUILDTOOL_DEPS) mkdir -p $(@D) $(call run_scala_main,$(firesim_sbt_project),chipyard.Generator,\ --target-dir $(GENERATED_DIR) \ diff --git a/sim/src/main/makefrag/midasexamples/Makefrag b/sim/src/main/makefrag/midasexamples/Makefrag index aaaf2c23..b310a128 100644 --- a/sim/src/main/makefrag/midasexamples/Makefrag +++ b/sim/src/main/makefrag/midasexamples/Makefrag @@ -44,7 +44,7 @@ mem_model_args = $(shell cat $(SIM_RUNTIME_CONF)) COMMON_SIM_ARGS ?= $(mem_model_args) vcs_args = +vcs+initreg+0 +vcs+initmem+0 -$(FIRRTL_FILE) $(ANNO_FILE): $(chisel_srcs) $(FIRRTL_JAR) +$(FIRRTL_FILE) $(ANNO_FILE): $(chisel_srcs) $(FIRRTL_JAR) $(SCALA_BUILDTOOL_DEPS) mkdir -p $(@D) $(call run_scala_main,$(firesim_sbt_project),chipyard.Generator, \ --target-dir $(GENERATED_DIR) \