Skip to content

Commit

Permalink
Merge pull request #1718 from ucb-bar/check-submodule-status
Browse files Browse the repository at this point in the history
Add generators/ submodule status check to all Make targets
  • Loading branch information
jerryz123 authored Jan 2, 2024
2 parents e1650a7 + 561e3fc commit e6d4fe8
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions common.mk
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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))

Expand Down Expand Up @@ -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
#########################################################################################
Expand Down

0 comments on commit e6d4fe8

Please sign in to comment.