* lib/libjava.exp (bytecompile_file): Use exec, not system.

From-SVN: r33989
This commit is contained in:
Tom Tromey 2000-05-18 17:17:55 +00:00 committed by Tom Tromey
parent 3eb16773fc
commit fcd4823055
2 changed files with 11 additions and 2 deletions

View File

@ -1,3 +1,7 @@
2000-05-18 Tom Tromey <tromey@cygnus.com>
* lib/libjava.exp (bytecompile_file): Use exec, not system.
2000-05-17 Tom Tromey <tromey@cygnus.com>
* libjava.mauve/mauve.exp (test_mauve): Call `prune_warnings'.

View File

@ -49,7 +49,7 @@ proc find_gcjh {} {
proc bytecompile_file { file objdir {classpath {}} } {
global env
global SUN_JAVAC
set dirname [file dirname $file];
set dirname [file dirname $file]
# If JDK doesn't run on your platform but some other
# JDK-compatible javac does, you may set SUN_JAVAC to point to it.
@ -72,7 +72,12 @@ proc bytecompile_file { file objdir {classpath {}} } {
set env(CLASSPATH) $classpath
}
if {[catch {
system "cd $dirname; $SUN_JAVAC $file -d $objdir 2>&1"
set here [pwd]
cd $dirname
set q [eval exec "$SUN_JAVAC [list $file] -d $objdir 2>@ stdout"]
cd $here
# "return" a result
set q $q
} msg]} then {
verbose "couldn't compile $file: $msg"
set r 0