Regenerated html docs. Tweaked how Makefile.am builds tarballs.
[dejagnu.git] / baseboards / basic-sim.exp
blob3fa7c4dc2c889eec282a7fd5e607c1cd029f2167
1 # find_sim -- find a usable simulator
2 # This proc is local to this file and is used to locate a simulator to use.
3 # First we see if SIM=foo was specified on the command line.
4 # Otherwise we search the build tree, then $PATH.
6 proc find_sim { target_alias sim_dir sim_name } {
7     global tool_root_dir;
8     global SIM
10     if [info exists SIM] {
11         return $SIM
12     }
14     if [is_remote host] {
15         if ![board_info host exists no_transform_name] {
16             return ${target_alias}-${sim_name};
17         } else {
18             return ${sim_name};
19         }
20     }
22     # We have to search because tool_root_dir may actually point to that blasted
23     # "target" subdirectory.
24     set try [lookfor_file ${tool_root_dir} sim/${sim_dir}/${sim_name}];
25     if { $try != "" } {
26         return $try;
27     }
28     return ${target_alias}-${sim_name};
31 proc setup_sim { subdir_name } {
32     global target_alias;
33     global tool_root_dir;
34     global board;
36     if [info exists target_alias] {
37         set tmp $target_alias;
38     } else {
39         if [board_info $board exists target_install] {
40             set tmp [lindex [board_info $board target_install] 0];
41         }
42     }
44     if ![board_info $board exists sim] {
45         set_board_info sim [find_sim $tmp $subdir_name run];
46     }
48     verbose "Using simulator [board_info $board sim]\n"
51 set_board_info is_simulator 1;