Skip to content

Commit 47c6275

Browse files
committed
Regenerate 3_place.sdc / 6_final.sdc if deleted while prereq is current
The recipe-less .sdc order rules relied on the .sdc being produced as a side-effect of building the prerequisite .odb/.log. If the .sdc alone is deleted while the prerequisite is up-to-date, GNU Make runs no recipe and leaves it missing, so downstream steps (e.g. CTS reading 3_place.sdc) fail. Add a recovery recipe that removes and rebuilds the prerequisite when the target is absent, forcing the side-effect .sdc to regenerate. Addresses gemini-code-assist review feedback on #4353. Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
1 parent 3173fd8 commit 47c6275

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

‎flow/Makefile‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -479,7 +479,10 @@ $(eval $(call do-copy,3_place,3_5_place_dp.odb,))
479479

480480
# detail_place writes 3_place.sdc alongside 3_5_place_dp.odb (constraints
481481
# are unchanged during placement), mirroring how synth writes 1_synth.sdc.
482+
# If the .sdc alone is deleted while the .odb is up-to-date, force the
483+
# step to rerun so the side-effect .sdc is regenerated.
482484
$(RESULTS_DIR)/3_place.sdc: $(RESULTS_DIR)/3_5_place_dp.odb
485+
@if [ ! -f $@ ]; then rm -f $<; $(MAKE) $<; fi
483486

484487
.PHONY: do-place
485488
do-place:
@@ -620,7 +623,10 @@ $(eval $(call do-step,6_report,$(RESULTS_DIR)/6_1_fill.odb $(RESULTS_DIR)/6_1_fi
620623

621624
# final_report writes 6_final.sdc alongside 6_final.odb (constraints are
622625
# unchanged during finishing), mirroring how synth writes 1_synth.sdc.
626+
# If the .sdc alone is deleted while the .log is up-to-date, force the
627+
# step to rerun so the side-effect .sdc is regenerated.
623628
$(RESULTS_DIR)/6_final.sdc: $(LOG_DIR)/6_report.log
629+
@if [ ! -f $@ ]; then rm -f $<; $(MAKE) $<; fi
624630

625631
$(RESULTS_DIR)/6_final.def: $(LOG_DIR)/6_report.log
626632

0 commit comments

Comments
 (0)