/[dejagnu]/dejagnu/config/unix.exp
ViewVC logotype

Diff of /dejagnu/config/unix.exp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.2 by rsavoye, Sun Feb 18 05:12:07 2001 UTC revision 1.3 by rsavoye, Mon Mar 17 02:25:07 2003 UTC
# Line 1  Line 1 
1  # Copyright (C) 1992 - 2001 Free Software Foundation, Inc.  # Copyright (C) 1992 - 2002, 2003 Free Software Foundation, Inc.
2    
3  # This program is free software; you can redistribute it and/or modify  # This program is free software; you can redistribute it and/or modify
4  # it under the terms of the GNU General Public License as published by  # it under the terms of the GNU General Public License as published by
# Line 35  load_lib remote.exp Line 35  load_lib remote.exp
35    
36  proc unix_load { dest prog args } {  proc unix_load { dest prog args } {
37      global ld_library_path      global ld_library_path
38      set output "";      set output ""
39        set orig_ld_library_path ""
40    
41      if { [llength $args] > 0 } {      if { [llength $args] > 0 } {
42          set parg [lindex $args 0];          set parg [lindex $args 0];
# Line 63  proc unix_load { dest prog args } { Line 64  proc unix_load { dest prog args } {
64              set command "$prog $parg";              set command "$prog $parg";
65          }          }
66    
67          if [info exists ld_library_path] {          if ![info exists ld_library_path] {
68              setenv LD_LIBRARY_PATH $ld_library_path                              set ld_library_path ""
             setenv SHLIB_PATH $ld_library_path  
69          }          }
70    
71            set orig_ld_library_path "[getenv LD_LIBRARY_PATH]"
72            setenv LD_LIBRARY_PATH "$ld_library_path:$orig_ld_library_path"
73            setenv SHLIB_PATH "$ld_library_path:$orig_ld_library_path"
74            verbose -log "Setting LD_LIBRARY_PATH to $ld_library_path:$orig_ld_library_path" 2
75    
76          set id [remote_spawn $dest "$command" "readonly"];          set id [remote_spawn $dest "$command" "readonly"];
77          if { $id < 0 } {          if { $id < 0 } {
78              set output "remote_spawn failed"              set output "remote_spawn failed"
# Line 82  proc unix_load { dest prog args } { Line 87  proc unix_load { dest prog args } {
87          # fix in the first place; this just tries to minimize the resulting          # fix in the first place; this just tries to minimize the resulting
88          # crap.)          # crap.)
89          if [info exists ld_library_path] {          if [info exists ld_library_path] {
90              unsetenv LD_LIBRARY_PATH              setenv LD_LIBRARY_PATH $orig_ld_library_path
91              unsetenv SHLIB_PATH              setenv SHLIB_PATH $orig_ld_library_path
92          }          }
93      } else {      } else {
94          set remotefile "/tmp/[file tail $prog].[pid]"          set remotefile "/tmp/[file tail $prog].[pid]"
# Line 118  proc unix_load { dest prog args } { Line 123  proc unix_load { dest prog args } {
123          set output [lindex $status 1]          set output [lindex $status 1]
124          set status [lindex $status 0]          set status [lindex $status 0]
125      }      }
126        
127        setenv LD_LIBRARY_PATH $orig_ld_library_path
128        setenv SHLIB_PATH $orig_ld_library_path
129    
130      verbose "Executed $prog, status $status" 2      verbose "Executed $prog, status $status" 2
131      if ![string match "" $output] {      if ![string match "" $output] {

Legend:
Removed from v.1.2  
changed lines
  Added in v.1.3

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26