From: Akim Demaille Date: Fri, 8 Mar 2002 12:01:23 +0000 (+0000) Subject: * bin/autom4te.in (&handle_m4): Do not foreach with `$_' as it X-Git-Tag: AUTOCONF-2.53~3 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3767d9c1047becf75366ed7eeaf35803bef768de;p=thirdparty%2Fautoconf.git * bin/autom4te.in (&handle_m4): Do not foreach with `$_' as it aliases the actual variables, and modifications of the former affect the latter. --- diff --git a/ChangeLog b/ChangeLog index f12e8740f..8bdea016b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,16 +1,21 @@ +2002-03-08 Akim Demaille + + * 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 * 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 * 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 * doc/autoconf.texi (Invoking autom4te): New. diff --git a/bin/autom4te.in b/bin/autom4te.in index 3460523f2..4e19d4f38 100644 --- a/bin/autom4te.in +++ b/bin/autom4te.in @@ -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"; } }