automake-patches
[Top][All Lists]
Advanced

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

Don't punish non-DJGPP/non-Windows platforms with long delays [PATCH]


From: Richard Dawe
Subject: Don't punish non-DJGPP/non-Windows platforms with long delays [PATCH]
Date: Mon, 31 Mar 2003 11:48:57 +0100

Hello.

As suggested by Akim, here's a patch to avoid punishing
non-DJGPP/non-Windows platforms with a 5 second delay in the test suite.
This patch is against the 1.7 branch.

Bye, Rich =]

Index: ChangeLog
===================================================================
RCS file: /cvs/automake/automake/ChangeLog,v
retrieving revision 1.2024.2.128
diff -p -u -3 -r1.2024.2.128 ChangeLog
--- ChangeLog   23 Mar 2003 20:37:35 -0000      1.2024.2.128
+++ ChangeLog   31 Mar 2003 10:41:58 -0000
@@ -1,3 +1,11 @@
+2003-03-31  Richard Dawe  <address@hidden>
+
+       * configure.in: Get the target platform name.  Define
+       MODIFICATION_DELAY as the time to wait after modifying a file,
+       to cope with timestamp granularity issues, depending
+       on the platform.
+       * tests/defs.in: Define `sleep' using MODIFICATION_DELAY.
+
 2003-03-23  Akim Demaille  <address@hidden>
            Alexandre Duret-Lutz  <address@hidden>
 
Index: configure.in
===================================================================
RCS file: /cvs/automake/automake/configure.in,v
retrieving revision 1.120.2.12
diff -p -u -3 -r1.120.2.12 configure.in
--- configure.in        20 Feb 2003 18:42:23 -0000      1.120.2.12
+++ configure.in        31 Mar 2003 10:41:59 -0000
@@ -31,6 +31,8 @@ am_AUTOCONF=${AUTOCONF-autoconf}
 
 AM_INIT_AUTOMAKE([1.6 dist-bzip2])
 
+AC_CANONICAL_TARGET
+
 # The API version is the base version.  We must guarantee
 # compatibility for all releases with the same API version.
 # Our current rule is that:
@@ -88,6 +90,21 @@ AC_SUBST([LN], [$am_cv_prog_ln])
 result=no
 test "x$am_cv_prog_ln" = xln && result=yes
 AC_MSG_RESULT([$result])
+
+# The amount we should wait after modifying files depends on the platform.
+# On Windows '95, '98 and ME, files modifications have 2-seconds
+# granularity and can be up to 3 seconds in the future w.r.t. the
+# system clock.  When it is important to ensure one file is older
+# than another we wait at least 5 seconds between creations.
+AC_MSG_CHECKING([how long we should wait after modifying a file])
+AC_CACHE_VAL([am_cv_modification_delay], [
+case $target in
+  *-pc-msdosdjgpp) am_cv_modification_delay=5;;
+  *)               am_cv_modification_delay=2;;
+esac
+])
+AC_SUBST([MODIFICATION_DELAY], [$am_cv_modification_delay])
+AC_MSG_RESULT([$am_cv_modification_delay])
 
 # Test for things needed by the test suite.
 AC_PROG_EGREP
Index: tests/defs.in
===================================================================
RCS file: /cvs/automake/automake/tests/defs.in,v
retrieving revision 1.4.2.8
diff -p -u -3 -r1.4.2.8 defs.in
--- tests/defs.in       20 Feb 2003 12:28:50 -0000      1.4.2.8
+++ tests/defs.in       31 Mar 2003 10:42:10 -0000
@@ -269,11 +269,10 @@ export AUTOMAKE ACLOCAL
 EGREP='@EGREP@'
 FGREP='@FGREP@'
 
-# On Windows '95, '98 and ME, files modifications have 2-seconds
-# granularity and can be up to 3 seconds in the future w.r.t. the
-# system clock.  When it is important to ensure one file is older
-# than another we wait at least 5 seconds between creations.
-sleep='sleep 5'
+# The amount we should wait after modifying files depends on the platform.
+# For instance, Windows '95, '98 and ME have 2-second granularity
+# and can be up to 3 seconds in the future w.r.t. the system clock.
+sleep='sleep @MODIFICATION_DELAY@'
 
 # The tests call `make -e' but we do not want $srcdir from the evironment
 # to override the definition from the Makefile.





reply via email to

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