]> git.ipfire.org Git - thirdparty/automake.git/commitdiff
automake: display whether sleep supports fractional seconds as yes/no.
authorBruno Haible <bruno@clisp.org>
Wed, 3 Jul 2024 15:27:02 +0000 (08:27 -0700)
committerKarl Berry <karl@freefriends.org>
Wed, 3 Jul 2024 15:27:02 +0000 (08:27 -0700)
https://lists.gnu.org/archive/html/automake/2024-07/msg00003.html

* m4/sanity.m4 (_AM_SLEEP_FRACTIONAL_SECONDS): Set
am_cv_sleep_fractional_seconds to yes/no, not true/false,
for consistency with other results.
Also "quote" this and other $am_cv values.
(_AM_FILESYSTEM_TIMESTAMP_RESOLUTION): Test for yes/no.
* t/ax/test-defs.in: Set am_cv_sleep_fractional_seconds to 'no',
not 'false'.

m4/sanity.m4
t/ax/test-defs.in

index 9e556b33a83086b775ced98db12efd0ba122eade..c7f32daf850c06ec04595bcd759c5bc9309d3356 100644 (file)
@@ -11,8 +11,8 @@
 AC_DEFUN([_AM_SLEEP_FRACTIONAL_SECONDS], [dnl
 AC_CACHE_CHECK([whether sleep supports fractional seconds],
                am_cv_sleep_fractional_seconds, [dnl
-AS_IF([sleep 0.001 2>/dev/null], [am_cv_sleep_fractional_seconds=true],
-                                 [am_cv_sleep_fractional_seconds=false])
+AS_IF([sleep 0.001 2>/dev/null], [am_cv_sleep_fractional_seconds=yes],
+                                 [am_cv_sleep_fractional_seconds=no])
 ])])
 
 # _AM_FILESYSTEM_TIMESTAMP_RESOLUTION
@@ -43,7 +43,7 @@ am_cv_filesystem_timestamp_resolution=2
 # packages.
 #
 am_try_resolutions=
-if $am_cv_sleep_fractional_seconds; then
+if test "$am_cv_sleep_fractional_seconds" = yes; then
   # Even a millisecond often causes a bunch of false positives,
   # so just try a hundredth of a second. The time saved between .001 and
   # .01 is not terribly consequential.
@@ -198,12 +198,12 @@ for am_try in 1 2; do
     break
   fi
   # Just in case.
-  sleep $am_cv_filesystem_timestamp_resolution
+  sleep "$am_cv_filesystem_timestamp_resolution"
   am_has_slept=yes
 done
 
 AC_MSG_RESULT([$am_build_env_is_sane])
-if test $am_build_env_is_sane = no; then
+if test "$am_build_env_is_sane" = no; then
   AC_MSG_ERROR([newly created file is older than distributed files!
 Check your system clock])
 fi
@@ -212,7 +212,7 @@ fi
 # generated files are strictly newer.
 am_sleep_pid=
 AS_IF([test -e conftest.file || grep 'slept: no' conftest.file >/dev/null 2>&1],, [dnl
-  ( sleep $am_cv_filesystem_timestamp_resolution ) &
+  ( sleep "$am_cv_filesystem_timestamp_resolution" ) &
   am_sleep_pid=$!
 ])
 AC_CONFIG_COMMANDS_PRE(
index aac5d60e3fef30b50bcb5483a0797aafb5bdfffb..542305788e71a3f986a8ac04d05116c662b5b2eb 100644 (file)
@@ -211,7 +211,7 @@ case $MTIME_RESOLUTION in
       MTIME_RESOLUTION=1
       # we must not sleep for fractional seconds when autom4te does not
       # support subsecond-mtimes, even when sleep supports it. See bug#67670.
-      am_cv_sleep_fractional_seconds=false
+      am_cv_sleep_fractional_seconds=no
       export am_cv_sleep_fractional_seconds
     fi
   ;;
@@ -232,7 +232,7 @@ esac
 # scripts in other packages, too.
 # 
 # At any rate, with this set to "sleep 1", there were still random
-# parallelization failures; setting am_cv_sleep_fractional_seconds=false
+# parallelization failures; setting am_cv_sleep_fractional_seconds=no
 # as above was still needed.
 #
 sleep="sleep $MTIME_RESOLUTION"