From 0355503d45cf9b576b9237b7e6e22a027c0e5dfd Mon Sep 17 00:00:00 2001 From: Taras Zaporozhets Date: Sun, 14 Mar 2021 17:12:50 +0100 Subject: [PATCH] Use relative path for BD references --- scripts/write_project_tcl_git.tcl | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/scripts/write_project_tcl_git.tcl b/scripts/write_project_tcl_git.tcl index 1bcc106..9e9ddff 100644 --- a/scripts/write_project_tcl_git.tcl +++ b/scripts/write_project_tcl_git.tcl @@ -809,8 +809,9 @@ proc add_references { sub_design } { write_bd_as_proc $file } else { # Skip adding file if it's already part of the project - lappend l_script_data "if { \[get_files [file tail $file]\] == \"\" } {" - lappend l_script_data " import_files -quiet -fileset [current_fileset -srcset] $file\n}" + set rel_file_path "[get_relative_file_path_for_source $file [get_script_execution_dir]]" + lappend l_script_data "if { \[get_files [file tail $rel_file_path]\] == \"\" } {" + lappend l_script_data " import_files -quiet -fileset [current_fileset -srcset] $rel_file_path\n}" } } }