Skip to content

utils.mk: give write_rc a do- sibling - #4545

Merged
maliberty merged 1 commit into
The-OpenROAD-Project:masterfrom
oharboe:do-write-rc
Sep 22, 2026
Merged

maliberty merged 1 commit into
The-OpenROAD-Project:masterfrom
oharboe:do-write-rc

Conversation

@oharboe

@oharboe oharboe commented Sep 18, 2026

Copy link
Copy Markdown
Collaborator

flow/Makefile states the convention where it generates the copy rules:

# generate make rules to copy a file, if a dependency change and
# a do- sibling rule that copies the file unconditionally.

do-klayout_tech, do-synth-report, do-step and do-copy all follow
it. The file target decides whether to run and delegates with
$(UNSET_AND_MAKE), and the do- target is the single place the
invocation lives:

synth-report: synth
	$(UNSET_AND_MAKE) do-synth-report

.PHONY: do-synth-report
do-synth-report:
	$(RUN_CMD) --log ... -- $(OPENROAD_CMD) $(SCRIPTS_DIR)/synth_metrics.tcl

write_rc is the one that conflates the two, so a caller doing its own
dependency checking cannot ask for just the operation.

The file target delegates rather than keeping a second copy of the
$(RUN_CMD) line, which is the same shape as every other do- pair.
Make's dependency checking is left exactly as it is.

🤖 Generated with Claude Code

flow/Makefile states the convention where it generates the copy rules:
"a do- sibling rule that copies the file unconditionally". do-klayout,
do-synth-report, do-step and do-copy all follow it. The file target
decides whether to run and delegates with $(UNSET_AND_MAKE), and the
do- target is the single place the invocation lives.

write_rc is the one that conflates the two, so a caller doing its own
dependency checking cannot ask for just the operation.

The file target delegates rather than keeping a second copy of the
$(RUN_CMD) line, which is the same shape as every other do- pair.
Make's dependency checking is unchanged.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request refactors the write_rc pattern rule in flow/util/utils.mk to delegate its execution to a new .PHONY target do-write_rc using $(UNSET_AND_MAKE). This aligns it with other do- sibling targets in the build system. There are no review comments, so no additional feedback is provided.

@openroad-ci

openroad-ci commented Sep 18, 2026 •

Copy link
Copy Markdown
Member

🔍 QoR check

Metrics reflect the PR merge build — i.e. what will land on the target branch.

Commit 78ed16b · Jenkins build #2 · Baseline: build · View build on dashboard

62 design(s) checked — 0 with regression(s), 1 without a comparable baseline.

@oharboe
oharboe requested a review from maliberty September 18, 2026 17:42
@maliberty
maliberty merged commit 23843c5 into The-OpenROAD-Project:master Sep 22, 2026
10 of 12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants