Skip to content

Commit 2fc1c88

Browse files
committed
makefile: .lyt files no longer use absolute paths for lef-files
instead the path is relative to the folder this makes it possible to mix and match docker generated .lyt files and local build files Signed-off-by: Øyvind Harboe <[email protected]>
1 parent 4a6fdce commit 2fc1c88

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

flow/Makefile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -350,11 +350,11 @@ $(OBJECTS_DIR)/klayout_tech.lef: $(TECH_LEF)
350350
@mkdir -p $(OBJECTS_DIR)
351351
sed '/OR_DEFAULT/d' $< > $@
352352

353-
$(OBJECTS_DIR)/klayout.lyt: $(KLAYOUT_TECH_FILE) $(OBJECTS_DIR)/klayout_tech.lef
354-
sed 's,<lef-files>.*</lef-files>,$(foreach file, $(OBJECTS_DIR)/klayout_tech.lef $(SC_LEF) $(ADDITIONAL_LEFS),<lef-files>$(abspath $(file))</lef-files>),g' $< > $@
353+
$(OBJECTS_DIR)/klayout.lyt: $(KLAYOUT_TECH_FILE) $(OBJECTS_DIR)/klayout_tech.lef
354+
sed 's,<lef-files>.*</lef-files>,$(foreach file, $(OBJECTS_DIR)/klayout_tech.lef $(SC_LEF) $(ADDITIONAL_LEFS),<lef-files>$(shell realpath --relative-to=$(RESULTS_DIR) $(file))</lef-files>),g' $< > $@
355355

356356
$(OBJECTS_DIR)/klayout_wrap.lyt: $(KLAYOUT_TECH_FILE) $(OBJECTS_DIR)/klayout_tech.lef
357-
sed 's,<lef-files>.*</lef-files>,$(foreach file, $(OBJECTS_DIR)/klayout_tech.lef $(WRAP_LEFS),<lef-files>$(abspath $(file))</lef-files>),g' $< > $@
357+
sed 's,<lef-files>.*</lef-files>,$(foreach file, $(OBJECTS_DIR)/klayout_tech.lef $(WRAP_LEFS),<lef-files>$(shell realpath --relative-to=$(RESULTS_DIR) $(file))</lef-files>),g' $< > $@
358358
# Create Macro wrappers (if necessary)
359359
# ==============================================================================
360360
WRAP_CFG = $(PLATFORM_DIR)/wrapper.cfg

0 commit comments

Comments
 (0)