From: Karl Berry Date: Mon, 11 May 2020 00:40:14 +0000 (-0700) Subject: automake: remove unused Automake::FileUtils::up_to_date_p function. X-Git-Tag: v1.16.3~49 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=afba8295f910f3b7e3f2c5d3edae0094b91d117a;p=thirdparty%2Fautomake.git automake: remove unused Automake::FileUtils::up_to_date_p function. Per thread at: https://lists.gnu.org/archive/html/automake-patches/2020-04/msg00000.html> especially: https://lists.gnu.org/archive/html/automake-patches/2020-05/msg00003.html * lib/Automake/FileUtils.pm (up_to_date_p): remove. Nothing in Automake itself uses this. It is used in Autoconf's autom4te utility, but Autoconf has its own copy, and the duplication was impeding auto4mte development, as discussed in the thread above. (While here, insert missing =over/=back to placate pod2text.) * NEWS (Miscellanous changes): note this. --- diff --git a/NEWS b/NEWS index 1bf5a0cd3..172265a49 100644 --- a/NEWS +++ b/NEWS @@ -72,6 +72,11 @@ New in ?.?.?: - valac argument matching more precise, to avoid garbage in DIST_COMMON. +* Miscellaneous changes + + - Removed function up_to_date_p in lib/Automake/FileUtils.pm. + We believe this function is completely unused. + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ New in 1.16.2: diff --git a/lib/Automake/FileUtils.pm b/lib/Automake/FileUtils.pm index 91f5cb217..c004f22e0 100644 --- a/lib/Automake/FileUtils.pm +++ b/lib/Automake/FileUtils.pm @@ -52,6 +52,8 @@ use vars qw (@ISA @EXPORT); &dir_has_case_matching_file &reset_dir_cache &set_dir_cache_file); +=over 4 + =item C Return the first path for a C<$file_name> in the Cs. @@ -179,34 +181,6 @@ sub update_file ($$;$) } -=item C - -Is C<$file> more recent than C<@dep>? - -=cut - -# $BOOLEAN -# &up_to_date_p ($FILE, @DEP) -# --------------------------- -sub up_to_date_p ($@) -{ - my ($file, @dep) = @_; - my $mtime = mtime ($file); - - foreach my $dep (@dep) - { - if ($mtime < mtime ($dep)) - { - verb "up_to_date ($file): outdated: $dep"; - return 0; - } - } - - verb "up_to_date ($file): up to date"; - return 1; -} - - =item C Display an error message for C<$command>, based on the content of @@ -405,4 +379,6 @@ sub set_dir_cache_file ($$) if exists $_directory_cache{$dirname}; } +=back + 1; # for require