1 # Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003 Free Software
4 # This file is part of DejaGnu.
6 # DejaGnu is free software; you can redistribute it and/or modify it
7 # under the terms of the GNU General Public License as published by
8 # the Free Software Foundation; either version 2 of the License, or
9 # (at your option) any later version.
11 # DejaGnu is distributed in the hope that it will be useful, but
12 # WITHOUT ANY WARRANTY; without even the implied warranty of
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 # General Public License for more details.
16 # You should have received a copy of the GNU General Public License
17 # along with DejaGnu; if not, write to the Free Software Foundation,
18 # Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
20 # find_sid -- find a usable SID simulator.
21 # This proc is local to this file and is used to locate a SID to use.
22 # Search the build tree, then $PATH.
24 # Written by Ben Elliston (bje@redhat.com).
26 proc find_sid { target_alias } {
30 set try [lookfor_file ${tool_root_dir} sid/bsp/${target_alias}-sid]
32 set sid_build [lookfor_file ${tool_root_dir} sid/main/dynamic/sid]
33 if { $sid_build != "" } { set env(SID) $sid_build }
37 # In this case, the bsp script must be available on the PATH.
38 # Just hope for the best!
39 return ${target_alias}-sid
42 # find_sid_conf -- find a usable pre-generated SID config file.
44 proc find_sid_conf { config } {
48 set try [lookfor_file ${srcdir} sid/bsp/pregen/${config}.conf]
49 if { $try == "" } then { return ${config}.conf } else { return $try }
52 # find_rawsid -- find a usable SID simulator.
53 # This proc is local to this file and is used to locate a SID to use.
54 # Search the build tree, then $PATH.
56 proc find_rawsid { } {
61 set try [lookfor_file ${tool_root_dir} sid/main/dynamic/sid]
66 set env(SID_LIBRARY_PATH) [join [glob "${tool_root_dir}/sid/component/*" "$srcdir/sid/component/*"] ":"]
67 # srcdir=/..../sid/component/testsuite
68 set tcl_library "$srcdir/tcl/library"
70 switch -glob $host_os {
71 {cygwin*} { set tcl_library [exec cygpath -w $tcl_library] }
73 set env(TCL_LIBRARY) $tcl_library