]> git.ipfire.org Git - thirdparty/autoconf.git/commitdiff
* bin/autom4te.in (&handle_m4): Do not foreach with `$_' as it
authorAkim Demaille <akim@epita.fr>
Fri, 8 Mar 2002 12:01:23 +0000 (12:01 +0000)
committerAkim Demaille <akim@epita.fr>
Fri, 8 Mar 2002 12:01:23 +0000 (12:01 +0000)
aliases the actual variables, and modifications of the former
affect the latter.

ChangeLog
bin/autom4te.in

index f12e8740fb6ad8a40f90015273fa4bc68e81d8ca..8bdea016bb64f6ae840fec5e7068a19970d32d02 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -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.
index 3460523f2d98e8c43674eb8d12f545f27967b097..4e19d4f38ed27c388543fa8484985aeb7b191710 100644 (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";
     }
 }