Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add generators/ submodule status check to all Make targets #1718

Merged
merged 2 commits into from
Jan 2, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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