* bin/autom4te.in (&handle_m4): Do not foreach with `$_' as it

aliases the actual variables, and modifications of the former
affect the latter.
This commit is contained in:
Akim Demaille 2002-03-08 12:01:23 +00:00
parent c4473c82aa
commit 3767d9c104
2 changed files with 10 additions and 6 deletions

View File

@ -1,16 +1,21 @@
2002-03-08 Akim Demaille <akim@epita.fr>
* bin/autom4te.in (&handle_m4): Do not foreach with `$_' as it
aliases the actual variables, and modifications of the former
affect the latter.
2002-03-08 Akim Demaille <akim@epita.fr>
* bin/autom4te.in (&handle_m4): Protect us from corrupted file
because of C-c: have m4 output in tmp files, then mv them.
2002-03-08 Akim Demaille <akim@epita.fr>
* bin/autoconf.in, bin/autoheader.in, bin/autom4te.in,
* bin/autoreconf.in, bin/autoscan.in, bin/autoupdate.in,
* bin/ifnames.in: Copyright update.
2002-03-08 Akim Demaille <akim@epita.fr>
* doc/autoconf.texi (Invoking autom4te): New.

View File

@ -622,12 +622,11 @@ sub handle_m4 ($@)
}
# Everything went ok: preserve the outputs.
foreach ($tcache, $ocache)
foreach my $file (map { $_ . $req->id } ($tcache, $ocache))
{
use File::Copy;
$_ .= $req->id;
move ("${_}t", "$_")
or die "$me: cannot not rename ${_}t as $_: $!\n";
move ("${file}t", "$file")
or die "$me: cannot not rename ${file}t as $file: $!\n";
}
}