automake-commit
[Top][All Lists]
Advanced

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

[automake-commit] branch master updated: doc: rewrite subsecond NEWS ent


From: Karl Berry
Subject: [automake-commit] branch master updated: doc: rewrite subsecond NEWS entry, sanity.m4 "make" testing wrong, etc.
Date: Wed, 19 Jun 2024 12:41:38 -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=cde0e3bb7c5bcbad6495e16f706d69fb6ebf60e7

The following commit(s) were added to refs/heads/master by this push:
     new cde0e3bb7 doc: rewrite subsecond NEWS entry, sanity.m4 "make" testing 
wrong, etc.
cde0e3bb7 is described below

commit cde0e3bb7c5bcbad6495e16f706d69fb6ebf60e7
Author: Karl Berry <karl@freefriends.org>
AuthorDate: Wed Jun 19 09:41:22 2024 -0700

    doc: rewrite subsecond NEWS entry, sanity.m4 "make" testing wrong, etc.
    
    * m4/sanity.m4 (_AM_FILESYSTEM_TIMESTAMP_RESOLUTION): mention
    that testing of "make" is wrong here; but $(MAKE) is not available?
    Do some special pleading that it won't matter in practice; we'll see.
    https://lists.gnu.org/archive/html/automake/2024-06/msg00051.html
    (AM_SANITY_CHECK): use $[]* instead of $[*]2 to avoid
    the confusing apparent (but not) use of shell arrays; the square
    brackets are parsed off by m4.
    * lib/am/check.am (output_system_information): en passant, mention
    that $(AWK) should always be defined since AC_PROG_AWK is part of
    AM_INIT_AUTOMAKE nowadays.
    * NEWS: rewrite subsecond NEWS entry:workaround, more references.
---
 NEWS            | 35 +++++++++++++++++++++++++----------
 lib/am/check.am |  2 ++
 m4/sanity.m4    | 15 ++++++++++++---
 3 files changed, 39 insertions(+), 13 deletions(-)

diff --git a/NEWS b/NEWS
index bf8c72d32..77347e5a3 100644
--- a/NEWS
+++ b/NEWS
@@ -57,17 +57,32 @@ New in 1.17:
 
 * Bugs fixed
 
-  - Generated file timestamp checks handle filesystems with sub-second
-    timestamp granularity dynamically, greatly speeding up make check,
-    etc. However, this requires an autom4te from Autoconf 2.72 or later
-    (or random test failures and other timing problems may ensue), as
-    well as a Perl, sleep program, make program, and filesystem that all
-    support sub-second resolution; otherwise, we fall back to one-second
-    granularity as before. When everything is supported, a line
-    "Features: subsecond-mtime" is now printed by automake --version and
-    autom4te --version. (commit 720a11531,
+  - Generated file timestamp checks handle filesystems with subsecond
+    timestamp granularity dynamically, greatly speeding up the sleep
+    done by AC_OUTPUT when generating config.status (all packages) and
+    Automake's make check.
+    
+    However, this subsecond-mtime support requires an autom4te from
+    Autoconf 2.72 or later (or random test failures and other timing
+    problems may ensue), as well as a Perl, sleep program, make program,
+    and filesystem that all support subsecond resolution; otherwise, we
+    fall back to a two-second granularity, not even testing the (common)
+    1s case since that would induce a 2s delay for all configure scripts
+    in all packages on all systems that don't support subsecond mtimes.
+    
+    When everything is supported, a line "Features: subsecond-mtime" is
+    now printed by automake --version and autom4te --version. 
+    
+    To override this check and delay, e.g. to use 1 second:
+      am_cv_filesystem_timestamp_resolution=1
+      export am_cv_filesystem_timestamp_resolution
+      
+    (commit 720a11531,
       https://lists.gnu.org/archive/html/automake-commit/2022-02/msg00009.html
-    then bug#60808, bug#64756, bug#67670, bug#68808, et al.)
+    then bug#60808, bug#64756, bug#67670, bug#68808, bug#71652,
+    history reviewed in
+      https://lists.gnu.org/archive/html/automake/2024-06/msg00054.html
+    and more info in surrounding threads.)
 
   - The default value of $ARFLAGS is now "cr" instead of "cru", to better
     support deterministic builds. (bug#20082)
diff --git a/lib/am/check.am b/lib/am/check.am
index ab1411ac5..e51a771bf 100644
--- a/lib/am/check.am
+++ b/lib/am/check.am
@@ -373,6 +373,8 @@ $(TEST_SUITE_LOG): $(TEST_LOGS)
 ## Omit the hostname for privacy.  Always a single word.
 ## Start the line with a label for clarity, and so commands like
 ## grep ^Linux don't get a false hit.
+## By the way, $(AWK) should always be defined since AC_PROG_AWK is
+## required by AM_INIT_AUTOMAKE nowadays.
           echo;                                     \
          { uname -a | $(AWK) '{                    \
   printf "System information (uname -a):";          \
diff --git a/m4/sanity.m4 b/m4/sanity.m4
index 7452c1aef..6602d19ea 100644
--- a/m4/sanity.m4
+++ b/m4/sanity.m4
@@ -62,7 +62,8 @@ rm -f conftest.ts?
 
 # Make sure ls -t actually works.  Do 'set' in a subshell so we don't
 # clobber the current shell's arguments. (Outer-level square brackets
-# are for m4; be careful, it's easy to get confused.)
+# are removed by m4; they're present so that m4 does not expand
+# <dollar><star>; be careful, easy to get confused.)
 if (
      set X `[ls -t conftest.ts[12]]` &&
      {
@@ -108,6 +109,14 @@ for am_try_res in $am_try_resolutions; do
       # everything else supports the subsecond mtimes, but make doesn't;
       # notably on macOS, which ships make 3.81 from 2006 (the last one
       # released under GPLv2). https://bugs.gnu.org/68808
+      # 
+      # It is incorrect to be testing "make" here; we should be testing
+      # $(MAKE). But $(MAKE) is not defined? At any rate, our hope is
+      # that in practice it does not matter: it is the system "make"
+      # which is (by far) the most likely to be broken, whereas if the
+      # user overrides it, probably they did so with a better, or at
+      # least not worse, make. Nevertheless: FIXME.
+      # https://lists.gnu.org/archive/html/automake/2024-06/msg00051.html
       #
       # So, first let's create a Makefile (real tab character):
       rm -f conftest.mk
@@ -179,11 +188,11 @@ for am_try in 1 2; do
   echo "timestamp, slept: $am_has_slept" > conftest.file
   if (
     set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
-    if test "$[*]" = "X"; then
+    if test "$[]*" = "X"; then
       # -L didn't work.
       set X `ls -t "$srcdir/configure" conftest.file`
     fi
-    test "$[2]" = conftest.file
+    test "$[]*" = conftest.file
   ); then
     am_build_env_is_sane=yes
     break



reply via email to

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