autoconf/bin
Zack Weinberg 40fa9edce6
Make autoreconf --force --install overwrite existing files (#110371)
The new feature of autoreconf --install installing config.guess,
config.sub, and install-sh itself didn’t implement --force mode
correctly; existing files would not be overwritten.

The fix has two parts.  If --force is in effect, we try to install
everything that we can from the needed-auxfiles list *before* checking
which of them already exist.  But also, we don’t overwrite existing
files unconditionally, even with --force; we only do so if the file we
can install has a newer “timestamp” line than the copy at the
destination.  This is because Automake can also install all of the
files we can install.  Suppose someone is using autoconf 2.70 with a
newly released automake 1.17; automake 1.17 will presumably ship with
a newer config.guess than autoconf 2.70 did; that version should win.

Fixes bug #110371.

* bin/autoreconf.in (extract_time_stamp, our_aux_file_is_newer): New functions.
  (install_aux_file): If the destination exists, and our copy is not
  newer, do not overwrite it.
  (autoreconf_current_directory): When $force is true, attempt to
  install all needed aux files *before* scanning for missing aux files.
  (throughout): Remove extra \n from various error messages.

* tests/torture.at (Missing auxiliary files (--force)): New test.
2020-11-30 18:06:26 -05:00
..
autoconf.as Manually sync ChannelDefs.pm from automake. 2020-09-22 15:46:42 -04:00
autoheader.in Disable all warnings when running autoconf as a subprocess. 2020-09-22 15:46:43 -04:00
autom4te.in Avoid ‘new File::Temp’ in Perl scripts. 2020-11-30 11:45:26 -05:00
autoreconf.in Make autoreconf --force --install overwrite existing files (#110371) 2020-11-30 18:06:26 -05:00
autoscan.in Disable all warnings when running autoconf as a subprocess. 2020-09-22 15:46:43 -04:00
autoupdate.in Manually sync ChannelDefs.pm from automake. 2020-09-22 15:46:42 -04:00
ifnames.in Fatalize all warnings in Perl code. 2020-08-31 13:15:46 -04:00
local.mk maint: make update-copyright 2020-01-01 11:45:50 -08:00