1 # find_sid -- find a usable SID simulator.
2 # This proc is local to this file and is used to locate a SID to use.
3 # Search the build tree, then $PATH.
5 # Written by Ben Elliston (bje@redhat.com).
7 proc find_sid { target_alias } {
11 set try [lookfor_file ${tool_root_dir} sid/bsp/${target_alias}-sid]
13 set sid_build [lookfor_file ${tool_root_dir} sid/main/dynamic/sid]
14 if { $sid_build != "" } { set env(SID) $sid_build }
18 # In this case, the bsp script must be available on the PATH.
19 # Just hope for the best!
20 return ${target_alias}-sid
23 # find_sid_conf -- find a usable pre-generated SID config file.
25 proc find_sid_conf { config } {
29 set try [lookfor_file ${srcdir} sid/bsp/pregen/${config}.conf]
30 if { $try == "" } then { return ${config}.conf } else { return $try }
33 # find_rawsid -- find a usable SID simulator.
34 # This proc is local to this file and is used to locate a SID to use.
35 # Search the build tree, then $PATH.
37 proc find_rawsid { } {
42 set try [lookfor_file ${tool_root_dir} sid/main/dynamic/sid]
47 set env(SID_LIBRARY_PATH) [join [glob "${tool_root_dir}/sid/component/*" "$srcdir/sid/component/*"] ":"]
48 # srcdir=/..../sid/component/testsuite
49 set tcl_library "$srcdir/tcl/library"
51 switch -glob $host_os {
52 {cygwin*} { set tcl_library [exec cygpath -w $tcl_library] }
54 set env(TCL_LIBRARY) $tcl_library