]> git.ipfire.org Git - thirdparty/automake.git/commitdiff
automake: remove unused Automake::FileUtils::up_to_date_p function.
authorKarl Berry <karl@freefriends.org>
Mon, 11 May 2020 00:40:14 +0000 (17:40 -0700)
committerKarl Berry <karl@freefriends.org>
Mon, 11 May 2020 00:40:14 +0000 (17:40 -0700)
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.

NEWS
lib/Automake/FileUtils.pm

diff --git a/NEWS b/NEWS
index 1bf5a0cd3ecfef59a00a4020ce7392d838c95892..172265a49ba5e151ddf4691ea61411e5c666913a 100644 (file)
--- 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:
index 91f5cb21719969a3ae2dcedcd7e704fedc03b4fc..c004f22e0f41e8d943495ff6da83423538569f37 100644 (file)
@@ -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<find_file ($file_name, @include)>
 
 Return the first path for a C<$file_name> in the C<include>s.
@@ -179,34 +181,6 @@ sub update_file ($$;$)
 }
 
 
-=item C<up_to_date_p ($file, @dep)>
-
-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<handle_exec_errors ($command, [$expected_exit_code = 0], [$hint])>
 
 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