1 # Copyright (C) 1997-2016 Free Software Foundation, Inc.
3 # This file is part of DejaGnu.
5 # DejaGnu is free software; you can redistribute it and/or modify it
6 # under the terms of the GNU General Public License as published by
7 # the Free Software Foundation; either version 3 of the License, or
8 # (at your option) any later version.
10 # DejaGnu is distributed in the hope that it will be useful, but
11 # WITHOUT ANY WARRANTY; without even the implied warranty of
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 # General Public License for more details.
15 # You should have received a copy of the GNU General Public License
16 # along with DejaGnu; if not, write to the Free Software Foundation,
17 # Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
19 # find_sid -- find a usable SID simulator.
20 # This proc is local to this file and is used to locate a SID to use.
21 # Search the build tree, then $PATH.
23 # Written by Ben Elliston (bje@redhat.com).
25 proc find_sid { target_alias } {
29 set try [lookfor_file $tool_root_dir sid/bsp/$target_alias-sid]
31 set sid_build [lookfor_file $tool_root_dir sid/main/dynamic/sid]
32 if { $sid_build ne "" } { set env(SID) $sid_build }
36 # In this case, the bsp script must be available on the PATH.
37 # Just hope for the best!
38 return $target_alias-sid
41 # find_sid_conf -- find a usable pre-generated SID config file.
43 proc find_sid_conf { config } {
47 set try [lookfor_file $srcdir sid/bsp/pregen/$config.conf]
48 if { $try eq "" } then { return $config.conf } else { return $try }
51 # find_rawsid -- find a usable SID simulator.
52 # This proc is local to this file and is used to locate a SID to use.
53 # Search the build tree, then $PATH.
55 proc find_rawsid { } {
60 set try [lookfor_file $tool_root_dir sid/main/dynamic/sid]
65 set env(SID_LIBRARY_PATH) [join [glob $tool_root_dir/sid/component/* $srcdir/sid/component/*] ":"]
66 # srcdir=/..../sid/component/testsuite
67 set tcl_library $srcdir/tcl/library
69 switch -glob -- $host_os {
70 {cygwin*} { set tcl_library [exec cygpath -w $tcl_library] }
72 set env(TCL_LIBRARY) $tcl_library