Make check-klayout an order-only prereq of merged GDS#4296
Merged
maliberty merged 1 commit intoJun 17, 2026
Merged
Conversation
The phony check-klayout target was a normal prerequisite of $(GDS_MERGED_FILE), which forced the KLayout def2stream merge to re-run on every `make finish`/`make metadata` invocation regardless of whether the GDS inputs had changed. Moving it behind `|` keeps the KLayout availability check when the GDS needs building, without marking the GDS perpetually out-of-date. Signed-off-by: Matt Liberty <mliberty@precisioninno.com>
Contributor
There was a problem hiding this comment.
Code Review
This pull request updates the flow/Makefile to make check-klayout an order-only prerequisite for the $(GDS_MERGED_FILE) target. This prevents unnecessary rebuilds of the merged GDS file when the check-klayout target is executed. There are no review comments, and I have no additional feedback to provide.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Running
make finish(ormake metadata, which depends onfinish) repeatedly re-runs the KLayoutdef2streamGDS merge every single time, even when nothing upstream changed.Root cause
The phony
check-klayouttarget was a normal prerequisite of$(GDS_MERGED_FILE):A phony prerequisite has no file on disk, so Make treats it as always newer than the target — forcing the merge recipe to run on every invocation regardless of timestamps. The re-merge then cascades into the
$(GDS_FINAL_FILE)copy and downstreamfinish/metadatawork.Fix
Move
check-klayoutbehind|so it's an order-only prerequisite. The KLayout availability check still runs when the GDS actually needs building, but its phony status no longer marks the GDS perpetually out-of-date.The
klayout_%viewer shortcuts at the othercheck-klayoutuse-site are intentionally left unchanged — those targets are themselves.PHONY(interactive viewers meant to run on demand).Verification
make finish -non an already-builtnangate45/gcd/baseno longer schedulesdo-gds-merged/def2stream, whereas before the fix it did on every run.