adi_env.tcl: Make default ad_hdl_dir path detection more robust

Instead of using a path relative to the current working directory use a path
relative to the location of the adi_env.tcl script.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
main
Lars-Peter Clausen 2015-04-01 13:21:38 +02:00
parent bdaad46704
commit 88abf98bd6
1 changed files with 3 additions and 2 deletions

View File

@ -1,8 +1,9 @@
# environment related stuff
set ad_hdl_dir "../.."
set ad_phdl_dir "../.."
set ad_hdl_dir [file normalize [file join [file dirname [info script]] "../.."]]
set ad_phdl_dir $ad_hdl_dir
if [info exists ::env(ADI_HDL_DIR)] {
set ad_hdl_dir $::env(ADI_HDL_DIR)