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..., rev. 2 [PATCH]


From: Richard Dawe
Subject: Don't punish non-DJGPP/non-Windows platforms..., rev. 2 [PATCH]
Date: Mon, 31 Mar 2003 12:15:58 +0100

Hello.

Sorry for the quick send of a revision, but I noticed some problems,
when I applied the patch to the 1.8 branch:

* A warning was generated about AC_CANONICAL_TARGET being used
  before AC_ARG_PROGRAM. So I moved AC_CANONICAL_TARGET to before
  AM_INIT_AUTOMAKE.

* The wording of the modification-delay test now mentions that it's
  in seconds.

This should apply cleanly to both the 1.7 and 1.8 branches.

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.

Bye, Rich =]
 
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 11:05:45 -0000
@@ -24,6 +24,8 @@ AC_INIT([GNU Automake], [1.7.3a], [bug-a
 AC_CONFIG_SRCDIR(automake.in)
 AC_CONFIG_AUX_DIR(lib)
 
+AC_CANONICAL_TARGET
+
 # Save the AUTOCONF setting before AM_INIT_AUTOMAKE overrides it;
 # this way we can run Autoconf tests from configure without being
 # bothered by `missing'.
@@ -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 many seconds 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 11:05:49 -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]