Blame lib/standard.exp

Packit 62fe53
# Copyright (C) 1992-2016 Free Software Foundation, Inc.
Packit 62fe53
#
Packit 62fe53
# This file is part of DejaGnu.
Packit 62fe53
#
Packit 62fe53
# DejaGnu is free software; you can redistribute it and/or modify it
Packit 62fe53
# under the terms of the GNU General Public License as published by
Packit 62fe53
# the Free Software Foundation; either version 3 of the License, or
Packit 62fe53
# (at your option) any later version.
Packit 62fe53
#
Packit 62fe53
# DejaGnu is distributed in the hope that it will be useful, but
Packit 62fe53
# WITHOUT ANY WARRANTY; without even the implied warranty of
Packit 62fe53
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
Packit 62fe53
# General Public License for more details.
Packit 62fe53
#
Packit 62fe53
# You should have received a copy of the GNU General Public License
Packit 62fe53
# along with DejaGnu; if not, write to the Free Software Foundation,
Packit 62fe53
# Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
Packit 62fe53
Packit 62fe53
# A set of standard functions for tools. Calls the target-specific
Packit 62fe53
# versions.
Packit 62fe53
Packit 62fe53
proc ${tool}_load { program args } {
Packit 62fe53
    if { [llength $args] > 0 } {
Packit 62fe53
	set program_args [lindex $args 0]
Packit 62fe53
    } else {
Packit 62fe53
	set program_args ""
Packit 62fe53
    }
Packit 62fe53
Packit 62fe53
    if { [llength $args] > 1 } {
Packit 62fe53
	set input_file [lindex $args 1]
Packit 62fe53
    } else {
Packit 62fe53
	set input_file ""
Packit 62fe53
    }
Packit 62fe53
Packit 62fe53
    return [remote_load target $program $program_args $input_file]
Packit 62fe53
}
Packit 62fe53
Packit 62fe53
proc ${tool}_compile { srcfile destfile compile_type options } {
Packit 62fe53
    target_compile $srcfile $destfile $compile_type $options
Packit 62fe53
}