Skip to content

Commit 25db9b8

Browse files
committed
Makefile: limit 'ln -fs' usage to within the results dir and .odb files
ln -fs makes a difference for .odb files, because they can be large, but for smaller files, simply copy. Also, limit ln -fs to within the results folder. This removes chances of surprises, such as files within the results folder changing when the source file changes. Signed-off-by: Øyvind Harboe <[email protected]>
1 parent b4f116e commit 25db9b8

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

flow/Makefile

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -399,11 +399,11 @@ $(RESULTS_DIR)/1_1_yosys.v: $(DONT_USE_LIBS) $(WRAPPED_LIBS) $(DONT_USE_SC_LIB)
399399

400400
$(RESULTS_DIR)/1_synth.v: $(RESULTS_DIR)/1_1_yosys.v
401401
mkdir -p $(RESULTS_DIR) $(LOG_DIR) $(REPORTS_DIR)
402-
ln -sf $(shell realpath --relative-to=$(dir $@) $<) $@
402+
cp $< $@
403403

404404
$(RESULTS_DIR)/1_synth.sdc: $(SDC_FILE)
405405
mkdir -p $(RESULTS_DIR) $(LOG_DIR) $(REPORTS_DIR)
406-
ln -sf $(shell realpath --relative-to=$(dir $@) $<) $@
406+
cp $< $@
407407

408408
clean_synth:
409409
rm -f $(RESULTS_DIR)/1_*.v $(RESULTS_DIR)/1_synth.sdc
@@ -532,7 +532,7 @@ $(RESULTS_DIR)/3_place.odb: $(RESULTS_DIR)/3_5_place_dp.odb
532532
ln -sf $(shell realpath --relative-to=$(dir $@) $<) $@
533533

534534
$(RESULTS_DIR)/3_place.sdc: $(RESULTS_DIR)/2_floorplan.sdc
535-
ln -sf $(shell realpath --relative-to=$(dir $@) $<) $@
535+
cp $< $@
536536

537537
# Clean Targets
538538
#-------------------------------------------------------------------------------
@@ -611,7 +611,7 @@ $(RESULTS_DIR)/5_route.odb: $(RESULTS_DIR)/5_2_route.odb
611611
ln -sf $(shell realpath --relative-to=$(dir $@) $<) $@
612612

613613
$(RESULTS_DIR)/5_route.sdc: $(RESULTS_DIR)/4_cts.sdc
614-
ln -sf $(shell realpath --relative-to=$(dir $@) $<) $@
614+
cp $< $@
615615

616616
$(RESULTS_DIR)/5_route.v:
617617
@export OR_DB=5_route ;\
@@ -674,10 +674,10 @@ $(RESULTS_DIR)/6_1_fill.odb: $(RESULTS_DIR)/5_route.odb
674674
endif
675675

676676
$(RESULTS_DIR)/6_1_fill.sdc: $(RESULTS_DIR)/5_route.sdc
677-
ln -sf $(shell realpath --relative-to=$(dir $@) $<) $@
677+
cp $< $@
678678

679679
$(RESULTS_DIR)/6_final.sdc: $(RESULTS_DIR)/5_route.sdc
680-
ln -sf $(shell realpath --relative-to=$(dir $@) $<) $@
680+
cp $< $@
681681

682682
$(LOG_DIR)/6_report.log: $(RESULTS_DIR)/6_1_fill.odb $(RESULTS_DIR)/6_1_fill.sdc
683683
($(TIME_CMD) $(OPENROAD_CMD) $(SCRIPTS_DIR)/final_report.tcl -metrics $(LOG_DIR)/6_report.json) 2>&1 | tee $(LOG_DIR)/6_report.log

0 commit comments

Comments
 (0)