1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
|
# Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
# 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
#
# This file is part of DejaGnu.
#
# DejaGnu is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# DejaGnu is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with DejaGnu; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
# find_sid -- find a usable SID simulator.
# This proc is local to this file and is used to locate a SID to use.
# Search the build tree, then $PATH.
#
# Written by Ben Elliston (bje@redhat.com).
proc find_sid { target_alias } {
global env
global tool_root_dir
set try [lookfor_file ${tool_root_dir} sid/bsp/${target_alias}-sid]
if { $try != "" } {
set sid_build [lookfor_file ${tool_root_dir} sid/main/dynamic/sid]
if { $sid_build != "" } { set env(SID) $sid_build }
return $try
}
# In this case, the bsp script must be available on the PATH.
# Just hope for the best!
return ${target_alias}-sid
}
# find_sid_conf -- find a usable pre-generated SID config file.
proc find_sid_conf { config } {
global env
global srcdir
set try [lookfor_file ${srcdir} sid/bsp/pregen/${config}.conf]
if { $try == "" } then { return ${config}.conf } else { return $try }
}
# find_rawsid -- find a usable SID simulator.
# This proc is local to this file and is used to locate a SID to use.
# Search the build tree, then $PATH.
proc find_rawsid { } {
global env
global tool_root_dir
global srcdir
set try [lookfor_file ${tool_root_dir} sid/main/dynamic/sid]
if { $try == "" } {
set try "sid"
} else {
# testing build tree
set env(SID_LIBRARY_PATH) [join [glob "${tool_root_dir}/sid/component/*" "$srcdir/sid/component/*"] ":"]
# srcdir=/..../sid/component/testsuite
set tcl_library "$srcdir/tcl/library"
global host_os
switch -glob $host_os {
{cygwin*} { set tcl_library [exec cygpath -w $tcl_library] }
}
set env(TCL_LIBRARY) $tcl_library
}
return $try
}
|