diff options
author | Ben Elliston <bje@gnu.org> | 2006-05-22 04:38:42 +0000 |
---|---|---|
committer | Ben Elliston <bje@gnu.org> | 2006-05-22 04:38:42 +0000 |
commit | b6feeb81729c431a93264a920e3d4ac93f6b96f5 (patch) | |
tree | 5f67575c57bbb6029582d6478d1255249bbfd4a4 /lib | |
parent | 752549198513cf5f7b2fed288216285d01a4a699 (diff) |
* lib/framework.exp (open_logs): Use file join where applicable.pre-if-stmt-braces
* lib/libgloss.exp (libgloss_link_flags, newlib_link_flags,
newlib_include_flags, g++_link_flags, libstdc++_link_flags,
get_multilibs, winsup_include_flags, winsup_link_flags): Likewise.
* lib/utils.exp (which): Likewise.
* runtest.exp (search_and_load_file, lookfor_file,
load_tool_init): Likewise.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/framework.exp | 4 | ||||
-rw-r--r-- | lib/libgloss.exp | 30 | ||||
-rw-r--r-- | lib/utils.exp | 8 |
3 files changed, 21 insertions, 21 deletions
diff --git a/lib/framework.exp b/lib/framework.exp index 1a42448..2dd4a3b 100644 --- a/lib/framework.exp +++ b/lib/framework.exp @@ -71,10 +71,10 @@ proc open_logs { } { set tool testrun } catch "exec rm -f $outdir/$tool.sum" - set sum_file [open "$outdir/$tool.sum" w] + set sum_file [open [file join $outdir $tool.sum] w] if { $xml } { catch "exec rm -f $outdir/$tool.xml" - set xml_file [open "$outdir/$tool.xml" w] + set xml_file [open [file join $outdir $tool.xml] w] xml_output "<?xml version=\"1.0\"?>" insertdtd xml_output "<testsuite>" diff --git a/lib/libgloss.exp b/lib/libgloss.exp index 2871004..376d46a 100644 --- a/lib/libgloss.exp +++ b/lib/libgloss.exp @@ -86,7 +86,7 @@ proc libgloss_link_flags { args } { if { $gloss_srcdir == "" } { return "" } - if [file exists $gccpath/libgloss/$cpu] { + if [file exists [file join $gccpath libgloss $cpu]] { verbose "Libgloss path is $gccpath/libgloss/$cpu" 2 return "-B$gccpath/libgloss/$cpu/ -L$gccpath/libgloss/$cpu -L$gloss_srcdir" } else { @@ -127,7 +127,7 @@ proc newlib_link_flags { args } { set gccpath "[get_multilibs]" verbose "Looking for $gccpath/newlib" - if [file exists $gccpath/newlib] { + if [file exists [file join $gccpath newlib]] { verbose "Newlib path is $gccpath/newlib" return "$result -B$gccpath/newlib/ -L$gccpath/newlib" } else { @@ -149,7 +149,7 @@ proc newlib_include_flags { args } { set gccpath "[get_multilibs]" - if [file exists $gccpath/newlib] { + if [file exists [file join $gccpath newlib]] { verbose "Newlib path is $gccpath/newlib" set newlib_dir [lookfor_file ${srcdir} newlib/libc/include/assert.h] @@ -266,25 +266,25 @@ proc g++_link_flags { args } { set ld_library_path "." if { $gccpath != "" } { - if [file exists "${gccpath}/lib/libstdc++.a"] { + if [file exists [file join ${gccpath} lib libstdc++.a]] { append ld_library_path ":${gccpath}/lib" } - if [file exists "${gccpath}/libg++/libg++.a"] { + if [file exists [file join ${gccpath} libg++ libg++.a]] { append flags "-L${gccpath}/libg++ " append ld_library_path ":${gccpath}/libg++" } - if [file exists "${gccpath}/libstdc++/libstdc++.a"] { + if [file exists [file join ${gccpath} libstdc++ libstdc++.a]] { append flags "-L${gccpath}/libstdc++ " append ld_library_path ":${gccpath}/libstdc++" } - if [file exists "${gccpath}/libstdc++-v3/src/.libs/libstdc++.a"] { + if [file exists [file join ${gccpath} libstdc++-v3 src .libs libstdc++.a]] { append flags "-L${gccpath}/libstdc++-v3/src/.libs " append ld_library_path ":${gccpath}/libstdc++-v3/src/.libs" } - if [file exists "${gccpath}/libiberty/libiberty.a"] { + if [file exists [file join ${gccpath} libiberty libiberty.a]] { append flags "-L${gccpath}/libiberty " } - if [file exists "${gccpath}/librx/librx.a"] { + if [file exists [file join ${gccpath} librx librx.a]] { append flags "-L${gccpath}/librx " } } else { @@ -354,14 +354,14 @@ proc libstdc++_link_flags { args } { set flags "" if { $gccpath != "" } { - if [file exists "${gccpath}/libstdc++/libstdc++.a"] { + if [file exists [file join ${gccpath} libstdc++ libstdc++.a]] { append flags "-L${gccpath}/libstdc++ " append ld_library_path ":${gccpath}/libstdc++" } - if [file exists "${gccpath}/libiberty/libiberty.a"] { + if [file exists [file join ${gccpath} libiberty libiberty.a]] { append flags "-L${gccpath}/libiberty " } - if [file exists "${gccpath}/librx/librx.a"] { + if [file exists [file join ${gccpath} librx librx.a]] { append flags "-L${gccpath}/librx " } } else { @@ -585,7 +585,7 @@ proc get_multilibs { args } { verbose "gccpath is $gccpath" 3 - if [file exists $multitop/$gccpath] { + if [file exists [file join $multitop $gccpath]] { verbose "GCC path is $multitop/$gccpath" 3 if { [llength $args] == 0 } { set board_info($target_board,multitop) "$multitop/$gccpath" @@ -894,7 +894,7 @@ proc winsup_include_flags { args } { set gccpath "[get_multilibs]" - if [file exists $gccpath/winsup] { + if [file exists [file join $gccpath winsup]] { verbose "Winsup path is $gccpath/winsup" set winsup_dir [lookfor_file ${srcdir} winsup/include/windows.h] @@ -925,7 +925,7 @@ proc winsup_link_flags { args } { set gccpath "[get_multilibs]" verbose "Looking for $gccpath/winsup" - if [file exists $gccpath/winsup] { + if [file exists [file join $gccpath winsup]] { verbose "Winsup path is $gccpath/newlib" return "-B$gccpath/winsup/ -L$gccpath/winsup" } else { diff --git a/lib/utils.exp b/lib/utils.exp index 428a85a..abfbd1f 100644 --- a/lib/utils.exp +++ b/lib/utils.exp @@ -138,11 +138,11 @@ proc which { file } { foreach i $path { verbose "Checking against $i" 3 - if [file exists $i/$file] { - if [file executable $i/$file] { - return $i/$file + if [file exists [file join $i $file]] { + if [file executable [file join $i $file]] { + return [file join $i $file] } else { - warning "$i/$file exists but is not an executable" + warning "[file join $i $file] exists but is not an executable" } } } |