adi_env: Normalize environment variables

If the ADI_HDL_DIR or ADI_PHDL_DIR are set on Windows platforms, an
invalid TCL character (e.g. backslash) may be used as a file separator,
causing issues with the build / library scripts.

Normalize the paths before using them as global TCL variables.
main
Matt Fornero 2017-10-23 10:52:53 +02:00 committed by István Csomortáni
parent 37323e3444
commit e8bab0b45f
2 changed files with 4 additions and 4 deletions

View File

@ -6,10 +6,10 @@ set ad_phdl_dir $ad_hdl_dir
if [info exists ::env(ADI_HDL_DIR)] {
set ad_hdl_dir $::env(ADI_HDL_DIR)
set ad_hdl_dir [file normalize $::env(ADI_HDL_DIR)]
}
if [info exists ::env(ADI_PHDL_DIR)] {
set ad_phdl_dir $::env(ADI_PHDL_DIR)
set ad_phdl_dir [file normalize $::env(ADI_PHDL_DIR)]
}

View File

@ -6,10 +6,10 @@ set ad_phdl_dir $ad_hdl_dir
if [info exists ::env(ADI_HDL_DIR)] {
set ad_hdl_dir $::env(ADI_HDL_DIR)
set ad_hdl_dir [file normalize $::env(ADI_HDL_DIR)]
}
if [info exists ::env(ADI_PHDL_DIR)] {
set ad_phdl_dir $::env(ADI_PHDL_DIR)
set ad_phdl_dir [file normalize $::env(ADI_PHDL_DIR)]
}