automake-patches
[Top][All Lists]
Advanced

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

FYI: Don't punish non-DJGPP/non-Windows platforms... committed [PATCH]


From: Richard Dawe
Subject: FYI: Don't punish non-DJGPP/non-Windows platforms... committed [PATCH]
Date: Fri, 11 Apr 2003 00:18:46 +0100

Hello.

Below is the final version of the patch to reduce the sleep time
back to 2 seconds on non-DJGPP/non-Windows platforms. No point
punishing other platforms for the weird timestamp granularity problems
on Windows.

I've committed the patch.

Bye, Rich =]

Index: ChangeLog
===================================================================
RCS file: /cvs/automake/automake/ChangeLog,v
retrieving revision 1.2202
diff -p -u -3 -r1.2202 ChangeLog
--- ChangeLog   10 Apr 2003 20:36:13 -0000      1.2202
+++ ChangeLog   10 Apr 2003 23:13:43 -0000
@@ -1,3 +1,11 @@
+2003-04-08  Richard Dawe  <address@hidden>
+
+       * configure.in: Get the build 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-04-08  Eric Siegerman  <address@hidden>  (tiny change)
 
        * automake.texi (Public macros): Clarify that the new
Index: configure
===================================================================
RCS file: /cvs/automake/automake/configure,v
retrieving revision 1.148
diff -p -u -3 -r1.148 configure
--- configure   24 Feb 2003 22:09:21 -0000      1.148
+++ configure   10 Apr 2003 23:13:56 -0000
@@ -273,7 +273,7 @@ PACKAGE_STRING='GNU Automake 1.7a'
 PACKAGE_BUGREPORT='address@hidden'
 
 ac_unique_file="automake.in"
-ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME 
PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix 
program_transform_name bindir sbindir libexecdir datadir sysconfdir 
sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir 
build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS 
INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL 
AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO AMTAR install_sh STRIP ac_ct_STRIP 
INSTALL_STRIP_PROGRAM AWK SET_MAKE am__leading_dot APIVERSION pkgvdatadir PERL 
TEX LN EGREP FGREP LIBOBJS LTLIBOBJS'
+ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME 
PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix 
program_transform_name bindir sbindir libexecdir datadir sysconfdir 
sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir 
build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build 
build_cpu build_vendor build_os INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA 
CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO AMTAR 
install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM AWK SET_MAKE am__leading_dot 
APIVERSION pkgvdatadir PERL TEX LN MODIFICATION_DELAY EGREP FGREP LIBOBJS 
LTLIBOBJS'
 ac_subst_files=''
 
 # Initialize some variables set by options.
@@ -779,6 +779,9 @@ Program names:
   --program-prefix=PREFIX            prepend PREFIX to installed program names
   --program-suffix=SUFFIX            append SUFFIX to installed program names
   --program-transform-name=PROGRAM   run sed PROGRAM on installed program names
+
+System types:
+  --build=BUILD     configure for building on BUILD [guessed]
 _ACEOF
 fi
 
@@ -1230,6 +1233,39 @@ ac_config_sub="$SHELL $ac_aux_dir/config
 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
 
 
+# Make sure we can run config.sub.
+$ac_config_sub sun4 >/dev/null 2>&1 ||
+  { { echo "$as_me:$LINENO: error: cannot run $ac_config_sub" >&5
+echo "$as_me: error: cannot run $ac_config_sub" >&2;}
+   { (exit 1); exit 1; }; }
+
+echo "$as_me:$LINENO: checking build system type" >&5
+echo $ECHO_N "checking build system type... $ECHO_C" >&6
+if test "${ac_cv_build+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_cv_build_alias=$build_alias
+test -z "$ac_cv_build_alias" &&
+  ac_cv_build_alias=`$ac_config_guess`
+test -z "$ac_cv_build_alias" &&
+  { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify 
one" >&5
+echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
+   { (exit 1); exit 1; }; }
+ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
+  { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_build_alias failed" 
>&5
+echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed" >&2;}
+   { (exit 1); exit 1; }; }
+
+fi
+echo "$as_me:$LINENO: result: $ac_cv_build" >&5
+echo "${ECHO_T}$ac_cv_build" >&6
+build=$ac_cv_build
+build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
+build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
+build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
+
+
+
 # Save the AUTOCONF setting before AM_INIT_AUTOMAKE overrides it;
 # this way we can run Autoconf tests from configure without being
 # bothered by `missing'.
@@ -1760,6 +1796,17 @@ test "x$am_cv_prog_ln" = xln && result=y
 echo "$as_me:$LINENO: result: $result" >&5
 echo "${ECHO_T}$result" >&6
 
+# 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.
+case $build in
+  *-pc-msdosdjgpp) MODIFICATION_DELAY=5;;
+  *)               MODIFICATION_DELAY=2;;
+esac
+
+
 # Test for things needed by the test suite.
 echo "$as_me:$LINENO: checking for egrep" >&5
 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
@@ -2437,6 +2484,10 @@ s,@ECHO_C@,$ECHO_C,;t t
 s,@ECHO_N@,$ECHO_N,;t t
 s,@ECHO_T@,$ECHO_T,;t t
 s,@LIBS@,$LIBS,;t t
+s,@build@,$build,;t t
+s,@build_cpu@,$build_cpu,;t t
+s,@build_vendor@,$build_vendor,;t t
+s,@build_os@,$build_os,;t t
 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
@@ -2461,6 +2512,7 @@ s,@pkgvdatadir@,$pkgvdatadir,;t t
 s,@PERL@,$PERL,;t t
 s,@TEX@,$TEX,;t t
 s,@LN@,$LN,;t t
+s,@MODIFICATION_DELAY@,$MODIFICATION_DELAY,;t t
 s,@EGREP@,$EGREP,;t t
 s,@FGREP@,$FGREP,;t t
 s,@LIBOBJS@,$LIBOBJS,;t t
Index: configure.in
===================================================================
RCS file: /cvs/automake/automake/configure.in,v
retrieving revision 1.123
diff -p -u -3 -r1.123 configure.in
--- configure.in        1 Dec 2002 10:54:40 -0000       1.123
+++ configure.in        10 Apr 2003 23:13:57 -0000
@@ -24,6 +24,8 @@ AC_INIT([GNU Automake], [1.7a], [bug-aut
 AC_CONFIG_SRCDIR(automake.in)
 AC_CONFIG_AUX_DIR(lib)
 
+AC_CANONICAL_BUILD
+
 # 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,17 @@ 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.
+case $build in
+  *-pc-msdosdjgpp) MODIFICATION_DELAY=5;;
+  *)               MODIFICATION_DELAY=2;;
+esac
+AC_SUBST([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.12
diff -p -u -3 -r1.12 defs.in
--- tests/defs.in       20 Feb 2003 12:28:37 -0000      1.12
+++ tests/defs.in       10 Apr 2003 23:13:59 -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]