From e8bab0b45fa37aba3079eb7a3d1a944b9a8f54aa Mon Sep 17 00:00:00 2001 From: Matt Fornero Date: Mon, 23 Oct 2017 10:52:53 +0200 Subject: [PATCH] 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. --- library/scripts/adi_env.tcl | 4 ++-- projects/scripts/adi_env.tcl | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/library/scripts/adi_env.tcl b/library/scripts/adi_env.tcl index 1e6ef3183..361e8858b 100644 --- a/library/scripts/adi_env.tcl +++ b/library/scripts/adi_env.tcl @@ -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)] } diff --git a/projects/scripts/adi_env.tcl b/projects/scripts/adi_env.tcl index 1e6ef3183..361e8858b 100644 --- a/projects/scripts/adi_env.tcl +++ b/projects/scripts/adi_env.tcl @@ -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)] }