/[dejagnu]/dejagnu/contrib/bluegnu2.0.3/lib/target.exp
ViewVC logotype

Diff of /dejagnu/contrib/bluegnu2.0.3/lib/target.exp

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

revision 1.1.1.1 by rsavoye, Mon Feb 5 04:30:24 2001 UTC revision 1.2 by bje, Sat Aug 16 13:08:57 2003 UTC
# Line 4  Line 4 
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
5  # the Free Software Foundation; either version 2 of the License, or  # the Free Software Foundation; either version 2 of the License, or
6  # (at your option) any later version.  # (at your option) any later version.
7  #  #
8  # This program is distributed in the hope that it will be useful,  # This program is distributed in the hope that it will be useful,
9  # but WITHOUT ANY WARRANTY; without even the implied warranty of  # but WITHOUT ANY WARRANTY; without even the implied warranty of
10  # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the  # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
11  # GNU General Public License for more details.  # GNU General Public License for more details.
12  #  #
13  # You should have received a copy of the GNU General Public License  # You should have received a copy of the GNU General Public License
14  # along with this program; if not, write to the Free Software  # along with this program; if not, write to the Free Software
15  # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.  # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
16    
17  # Please email any bugs, comments, and/or additions to this file to:  # Please email any bugs, comments, and/or additions to this file to:
18  # bug-dejagnu@prep.ai.mit.edu  # bug-dejagnu@prep.ai.mit.edu
# Line 268  proc pop_host { } { Line 268  proc pop_host { } {
268  #  #
269  proc list_targets { } {  proc list_targets { } {
270      global target_info      global target_info
271        
272      if ![info exists target_info] {      if ![info exists target_info] {
273          return ""          return ""
274      }      }
# Line 306  proc prune_warnings { text } { Line 306  proc prune_warnings { text } {
306          regsub -all "(^|\n)(/usr/(ucb|bin)/ld.*without exceptions was\[^\n\]+\n?)" $text "\\1" text          regsub -all "(^|\n)(/usr/(ucb|bin)/ld.*without exceptions was\[^\n\]+\n?)" $text "\\1" text
307      }      }
308    
309    
310      # Ignore these.      # Ignore these.
311      regsub -all "(^|\n)\[^\n\]*linker input file unused since linking not done" $text "" text      regsub -all "(^|\n)\[^\n\]*linker input file unused since linking not done" $text "" text
312      regsub -all "(^|\n)\[^\n\]*file path prefix \[^\n\]* never used" $text "" text      regsub -all "(^|\n)\[^\n\]*file path prefix \[^\n\]* never used" $text "" text
# Line 324  proc compile { arg } { Line 324  proc compile { arg } {
324      global target_info      global target_info
325      global comp_output      global comp_output
326      global CC      global CC
327        
328      if [info exists target_info(target,cflags)] {      if [info exists target_info(target,cflags)] {
329          lappend options "$target_info(target,cflags)"          lappend options "$target_info(target,cflags)"
330      }      }
# Line 337  proc compile { arg } { Line 337  proc compile { arg } {
337  }  }
338    
339  #  #
340  # Invoke the archiver.  # Invoke the archiver.
341  #  #
342  proc archive { arg } {  proc archive { arg } {
343      global target_info      global target_info
344      global comp_output      global comp_output
345      global AR      global AR
346        
347      if [info exists target_info(target,arflags)] {      if [info exists target_info(target,arflags)] {
348          lappend options "$target_info(target,arflags)"          lappend options "$target_info(target,arflags)"
349      }      }
# Line 358  proc ranlib { arg } { Line 358  proc ranlib { arg } {
358      global target_info      global target_info
359      global comp_output      global comp_output
360      global RANLIB      global RANLIB
361        
362      append options "$arg"      append options "$arg"
363    
364      verbose "Invoking the archiver as $RANLIB $options"      verbose "Invoking the archiver as $RANLIB $options"
# Line 374  proc link_objects { arg } { Line 374  proc link_objects { arg } {
374      global target_info      global target_info
375      global comp_output      global comp_output
376      global LD      global LD
377        
378      set options "$arg"      set options "$arg"
379      if [info exists target_info(target,ldlags)] {      if [info exists target_info(target,ldlags)] {
380          lappend options "$target_info(target,ldlags)"          lappend options "$target_info(target,ldlags)"
381      }      }
382      
383      set comp_output [execute_anywhere "$LD $args"]      set comp_output [execute_anywhere "$LD $args"]
384      return [ prune_warnings $comp_output]      return [ prune_warnings $comp_output]
385  }  }
# Line 393  proc link_objects { arg } { Line 393  proc link_objects { arg } {
393  proc execute_anywhere { cmdline } {  proc execute_anywhere { cmdline } {
394      global exec_output      global exec_output
395      global target_info      global target_info
396      
397      if ![info exists target_info(current,prompt)] {      if ![info exists target_info(current,prompt)] {
398          set prompt ""          set prompt ""
399      } else {      } else {
400          set prompt $target_info(current,prompt)          set prompt $target_info(current,prompt)
401      }      }
402        
403      # if we're running stuff that's hosted on the same machine      # if we're running stuff that's hosted on the same machine
404      if ![is3way] {      if ![is3way] {
405          verbose -log "Executing on local host: ${cmdline}" 2          verbose -log "Executing on local host: ${cmdline}" 2
# Line 443  proc execute_anywhere { cmdline } { Line 443  proc execute_anywhere { cmdline } {
443      if [info exists exec_output] {      if [info exists exec_output] {
444          verbose "EXEC_OUTPUT = \"$exec_output\"" 2          verbose "EXEC_OUTPUT = \"$exec_output\"" 2
445      }      }
446        
447        
448  #    stty echo  #    stty echo
449      # close the connection      # close the connection
450      remote_close $shellid      remote_close $shellid
451        
452      if [info exists exec_output] {      if [info exists exec_output] {
453          return $exec_output          return $exec_output
454      } else {      } else {
# Line 474  proc getprompt { shellid } { Line 474  proc getprompt { shellid } {
474    
475      set tries 0      set tries 0
476      set text ""      set text ""
477      
478      while { $tries <=3 } {      while { $tries <=3 } {
479          verbose "Trying to get the remote host's prompt"          verbose "Trying to get the remote host's prompt"
480          send -i $shellid "ACK\r\n"          send -i $shellid "ACK\r\n"
# Line 503  proc getprompt { shellid } { Line 503  proc getprompt { shellid } {
503          }          }
504          incr tries          incr tries
505      }      }
506        
507      # see if we maxed out on errors      # see if we maxed out on errors
508      if { $tries >= 3 } {      if { $tries >= 3 } {
509          warning "Couldn't get the prompt"          warning "Couldn't get the prompt"

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

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