diff --git a/common.mk b/common.mk index f525b526..c4ae8548 100644 --- a/common.mk +++ b/common.mk @@ -57,7 +57,8 @@ HELP_COMMANDS += \ " firrtl = generate intermediate firrtl files from chisel elaboration" \ " run-tests = run all assembly and benchmark tests" \ " launch-sbt = start sbt terminal" \ -" find-config-fragments = list all config. fragments" +" find-config-fragments = list all config. fragments" \ +" check-submodule-status = check that all submodules in generators/ have been initialized" ######################################################################################### # include additional subproject make fragments @@ -118,7 +119,7 @@ $(BOOTROM_TARGETS): $(build_dir)/bootrom.%.img: $(TESTCHIP_RSRCS_DIR)/testchipip ######################################################################################### # compile scala jars ######################################################################################### -$(CHIPYARD_CLASSPATH_TARGETS) &: $(CHIPYARD_SCALA_SOURCES) $(SCALA_BUILDTOOL_DEPS) $(CHIPYARD_VLOG_SOURCES) +$(CHIPYARD_CLASSPATH_TARGETS) &: check-submodule-status $(CHIPYARD_SCALA_SOURCES) $(SCALA_BUILDTOOL_DEPS) $(CHIPYARD_VLOG_SOURCES) mkdir -p $(dir $@) $(call run_sbt_assembly,$(SBT_PROJECT),$(CHIPYARD_CLASSPATH)) @@ -451,6 +452,15 @@ find-config-fragments: help: @for line in $(HELP_LINES); do echo "$$line"; done +######################################################################################### +# Check submodule status +######################################################################################### + +.PHONY: check-submodule-status +check-submodule-status: + echo "Checking all submodules in generators/ are initialized. Uninitialized submodules will be displayed" + ! git submodule status $(base_dir)/generators | grep ^- + ######################################################################################### # Implicit rule handling #########################################################################################