2014-03-24 Max Ostapenko * config/unix.exp: Parse incoming string in environment variables and program name itself. diff --git a/config/unix.exp b/config/unix.exp index 4b244ca..fa0327a 100644 --- a/config/unix.exp +++ b/config/unix.exp @@ -50,6 +50,9 @@ proc unix_load { dest prog args } { set inp "" } + regsub "^ *((\[^ \]+=\[^ \]* *)*).*" $prog "\\1" environ + regsub "^ *((\[^ \]+=\[^ \]* *)*)" $prog "" prog + if {![file exists $prog]} then { # We call both here because this should never happen. perror "$prog does not exist in unix_load." @@ -114,7 +117,7 @@ proc unix_load { dest prog args } { return [list "unresolved" ""] } } - set status [remote_exec $dest "$remotefile" $parg $inp] + set status [remote_exec $dest "$environ $remotefile" $parg $inp] remote_file $dest delete $remotefile.o $remotefile if { [lindex $status 0] < 0 } { verbose -log "Couldn't execute $prog, [lindex $status 1]" 3