libjava.exp (test_libjava_from_javac): Use regsub not string map.

* lib/libjava.exp (test_libjava_from_javac): Use regsub not string map.
       * libjava.mauve/mauve.exp (mauve_compute_uses): Likewise.
       (test_mauve): Likewise.

From-SVN: r62937
This commit is contained in:
Mark Wielaard 2003-02-15 16:39:28 +00:00 committed by Mark Wielaard
parent c68c712ec3
commit 6ff741aa6c
3 changed files with 11 additions and 3 deletions

View file

@ -1,3 +1,9 @@
2003-02-15 Mark Wielaard <mark@klomp.org>
* lib/libjava.exp (test_libjava_from_javac): Use regsub not string map.
* libjava.mauve/mauve.exp (mauve_compute_uses): Likewise.
(test_mauve): Likewise.
2003-02-14 Mark Wielaard <mark@klomp.org>
* lib/libjava.exp (test_libjava_from_javac): Don't create .o files

View file

@ -788,7 +788,7 @@ proc test_libjava_from_javac { options srcfile compile_args inpfile resultfile e
foreach c_file $class_files {
set executable [file rootname [file tail $c_file]].o
# Don't write files which contain $ chars.
set executable [string map {$ ^} $executable]
regsub -all "\\$" $executable "\^" executable
set x [libjava_prune_warnings \
[libjava_tcompile '$c_file' "$executable" $type $args]]
lappend removeList $executable

View file

@ -49,7 +49,8 @@ proc mauve_compute_uses {aName} {
# Now add all inner classes
foreach inner [glob -nocomplain [file rootname $file]$*.class] {
# Prevent excessive escaping by replacing $ with a ^ in the .o name
set inner [string map {$ ^} [file rootname $inner]].o
set inner [file rootname $inner].o
regsub -all "\\$" $inner "\^" inner
lappend uses($item) $inner
}
}
@ -186,7 +187,8 @@ proc test_mauve {} {
if {! [file exists $obj]} then {
verbose "compiling $obj for test of $class"
# The .class file does contain a $, but we can quote it between "'"s.
set srcfile [string map {^ $} [file rootname $obj]].class
set srcfile [file rootname $obj].class
regsub -all "\\^" $srcfile "\$" srcfile
set x [libjava_prune_warnings \
[libjava_tcompile '[pwd]/$srcfile' $obj object $compile_args]]
if {$x != ""} then {