1From cd47c328cb53546891bb3dc7c9b2c54ed01cc6d1 Mon Sep 17 00:00:00 2001 2From: Richard Purdie <richard.purdie@linuxfoundation.org> 3Date: Mon, 7 Dec 2015 18:28:05 +0000 4Subject: [PATCH] automake: Remove delays in configure scripts using automake 5 6By default automake puts "sleep 1" into the start of configure scripts 7which adds pointless delays to them. Rather than do this, lets just assume 8our systems are sane. 9 10RP 112015/12/7 12Upstream-Status: Inappropriate 13 14--- 15 m4/sanity.m4 | 55 ------------------------------------------------------- 16 1 file changed, 55 deletions(-) 17 18diff --git a/m4/sanity.m4 b/m4/sanity.m4 19index eaac218..bfdfe88 100644 20--- a/m4/sanity.m4 21+++ b/m4/sanity.m4 22@@ -23,60 +23,5 @@ case $srcdir in 23 AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);; 24 esac 25 26-# Do 'set' in a subshell so we don't clobber the current shell's 27-# arguments. Must try -L first in case configure is actually a 28-# symlink; some systems play weird games with the mod time of symlinks 29-# (eg FreeBSD returns the mod time of the symlink's containing 30-# directory). 31-if ( 32- am_has_slept=no 33- for am_try in 1 2; do 34- echo "timestamp, slept: $am_has_slept" > conftest.file 35- set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` 36- if test "$[*]" = "X"; then 37- # -L didn't work. 38- set X `ls -t "$srcdir/configure" conftest.file` 39- fi 40- if test "$[*]" != "X $srcdir/configure conftest.file" \ 41- && test "$[*]" != "X conftest.file $srcdir/configure"; then 42- 43- # If neither matched, then we have a broken ls. This can happen 44- # if, for instance, CONFIG_SHELL is bash and it inherits a 45- # broken ls alias from the environment. This has actually 46- # happened. Such a system could not be considered "sane". 47- AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken 48- alias in your environment]) 49- fi 50- if test "$[2]" = conftest.file || test $am_try -eq 2; then 51- break 52- fi 53- # Just in case. 54- sleep 1 55- am_has_slept=yes 56- done 57- test "$[2]" = conftest.file 58- ) 59-then 60- # Ok. 61- : 62-else 63- AC_MSG_ERROR([newly created file is older than distributed files! 64-Check your system clock]) 65-fi 66 AC_MSG_RESULT([yes]) 67-# If we didn't sleep, we still need to ensure time stamps of config.status and 68-# generated files are strictly newer. 69-am_sleep_pid= 70-if grep 'slept: no' conftest.file >/dev/null 2>&1; then 71- ( sleep 1 ) & 72- am_sleep_pid=$! 73-fi 74-AC_CONFIG_COMMANDS_PRE( 75- [AC_MSG_CHECKING([that generated files are newer than configure]) 76- if test -n "$am_sleep_pid"; then 77- # Hide warnings about reused PIDs. 78- wait $am_sleep_pid 2>/dev/null 79- fi 80- AC_MSG_RESULT([done])]) 81-rm -f conftest.file 82 ]) 83