automake-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[automake-commit] branch master updated: m4: fall back to non-fractional


From: Karl Berry
Subject: [automake-commit] branch master updated: m4: fall back to non-fractional timestamps with older autom4te.
Date: Wed, 01 Nov 2023 20:40:58 -0400

This is an automated email from the git hooks/post-receive script.

karl pushed a commit to branch master
in repository automake.

View the commit online:
https://git.savannah.gnu.org/gitweb/?p=automake.git;a=commitdiff;h=b6fa73115d094c8d0da1d6759b6e7c7fca1f8a07

The following commit(s) were added to refs/heads/master by this push:
     new b6fa73115 m4: fall back to non-fractional timestamps with older 
autom4te.
b6fa73115 is described below

commit b6fa73115d094c8d0da1d6759b6e7c7fca1f8a07
Author: Bogdan <bogdro_rep@gmx.us>
AuthorDate: Wed Nov 1 17:40:47 2023 -0700

    m4: fall back to non-fractional timestamps with older autom4te.
    
    * m4/sanity.m4 (_AM_FILESYSTEM_TIMESTAMP_RESOLUTION): if
    HiRes is not present in Autom4te/FileUtils.pm, do not consider
    fractional sleeps.
---
 m4/sanity.m4 | 22 ++++++++++++++++++++--
 1 file changed, 20 insertions(+), 2 deletions(-)

diff --git a/m4/sanity.m4 b/m4/sanity.m4
index db9a1f563..445d1fb80 100644
--- a/m4/sanity.m4
+++ b/m4/sanity.m4
@@ -16,10 +16,28 @@ AS_IF([sleep 0.001 2>/dev/null], 
[am_cv_sleep_fractional_seconds=true], [am_cv_s
 # _AM_FILESYSTEM_TIMESTAMP_RESOLUTION
 # -----------------------------------
 # Determine the filesystem timestamp resolution.  Modern systems are nanosecond
-# capable, but historical systems could be millisecond, second, or even 
2-second
-# resolution.
+# capable, but historical systems could have millisecond, second, or even
+# 2-second resolution.
 AC_DEFUN([_AM_FILESYSTEM_TIMESTAMP_RESOLUTION], [dnl
 AC_REQUIRE([_AM_SLEEP_FRACTIONAL_SECONDS])
+#
+# Check if Autom4te uses Time::HiRes. If not, we cannot use fractional sleep,
+# because this sanity test and automated tests will be unreliable due to
+# Autom4te's caching of results and comparing timestamps.
+# More info: long thread around
+#     https://lists.gnu.org/archive/html/automake/2023-04/msg00002.html
+# and https://debbugs.gnu.org/cgi/bugreport.cgi?bug=64756.  
+AC_PATH_PROG([AUTOM4TE], [autom4te])
+if test x"$autom4te_perllibdir" = x; then
+  autom4te_perllibdir=`sed -n \
+   '/autom4te_perllibdir/{s/^.*|| //;s/;$//;s/^.//;s/.$//;p;q}' <$AUTOM4TE`
+fi
+if grep HiRes "$autom4te_perllibdir"/Autom4te/FileUtils.pm >/dev/null; then
+  :
+else
+  am_cv_sleep_fractional_seconds=false
+fi
+
 AC_CACHE_CHECK([the filesystem timestamp resolution], 
am_cv_filesystem_timestamp_resolution, [dnl
 # Use names that lexically sort older-first when the timestamps are equal.
 rm -f conftest.file.a conftest.file.b



reply via email to

[Prev in Thread] Current Thread [Next in Thread]