]> sourceware.org Git - automake.git/commitdiff
* Makefile.am (maintainer-check): Suggest using $sleep instead of
authorAlexandre Duret-Lutz <adl@gnu.org>
Fri, 10 Jan 2003 19:30:16 +0000 (19:30 +0000)
committerAlexandre Duret-Lutz <adl@gnu.org>
Fri, 10 Jan 2003 19:30:16 +0000 (19:30 +0000)
sleep 2.
* tests/defs.in (sleep): New variable.
* tests/asm.test, tests/confsub.test, tests/lisp3.test,
tests/texinfo16.test, tests/warnopts.test, tests/yaccvpath.test:
Use $sleep instead of sleep 2, to work around timestamp
inconsistencies in Windows.
Reported by Richard Dawe.

ChangeLog
Makefile.am
Makefile.in
tests/asm.test
tests/confsub.test
tests/defs.in
tests/lisp3.test
tests/texinfo16.test
tests/warnopts.test
tests/yaccvpath.test

index 94abffe2cad29eb3210462f93fe699c9a2edef24..fc702e2d1eca3f07d1496c808b8b40fadb8bf69c 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,14 @@
 2003-01-10  Alexandre Duret-Lutz  <adl@gnu.org>
 
+       * Makefile.am (maintainer-check): Suggest using $sleep instead of
+       sleep 2.
+       * tests/defs.in (sleep): New variable.
+       * tests/asm.test, tests/confsub.test, tests/lisp3.test,
+       tests/texinfo16.test, tests/warnopts.test, tests/yaccvpath.test:
+       Use $sleep instead of sleep 2, to work around timestamp
+       inconsistencies in Windows.
+       Reported by Richard Dawe.
+
        * Makefile.am (maintainer-check): Do not require SHELL=/bin/sh
        after $MAKE -e.
        * tests/ansi3.test, tests/ansi5.test, tests/cond22.test,
index 8efc2dedd216ce7050e871716067d60700a9f94b..a0925b1946097c867e6a492c400cde913d8dc9eb 100644 (file)
@@ -228,15 +228,15 @@ maintainer-check: automake aclocal
          exit 1; \
        fi
 ## Never use `sleep 1' to create files with different timestamps.
-## Use `sleep 2' instead.  Some filesystems (e.g., Windows') have only
+## Use `$sleep' instead.  Some filesystems (e.g., Windows') have only
 ## a 2sec resolution.
-       @if grep -E '\bsleep +1\b' $(srcdir)/tests/*.test; then \
-         echo 'Do not use "sleep 1" in the above tests.  Use "sleep 2" instead.' 1>&2; \
+       @if grep -E '\bsleep +[12345]\b' $(srcdir)/tests/*.test; then \
+         echo 'Do not use "sleep x" in the above tests.  Use "$$sleep" instead.' 1>&2; \
          exit 1; \
        fi
 ## fgrep and egrep are not required by POSIX.
        @if grep -E '\b[ef]grep\b' $(srcdir)/tests/*.test ; then \
-         echo 'Do not use egrep or fgrep in test cases.  Use $FGREP or $EGREP.' 1>&2; \
+         echo 'Do not use egrep or fgrep in test cases.  Use $$FGREP or $$EGREP.' 1>&2; \
          exit 1; \
        fi
        @if grep -E '\b[ef]grep\b' $(srcdir)/lib/am/*.am $(srcdir)/m4/*.m4; then \
index 9ec14ce0246ed083c6d4574d6bc714a320f8ce22..3e4736e1b791c242bbee7f829a05d3c464f855be 100644 (file)
@@ -804,12 +804,12 @@ maintainer-check: automake aclocal
          echo 'the above lines.' 1>&2; \
          exit 1; \
        fi
-       @if grep -E '\bsleep +1\b' $(srcdir)/tests/*.test; then \
-         echo 'Do not use "sleep 1" in the above tests.  Use "sleep 2" instead.' 1>&2; \
+       @if grep -E '\bsleep +[12345]\b' $(srcdir)/tests/*.test; then \
+         echo 'Do not use "sleep x" in the above tests.  Use "$$sleep" instead.' 1>&2; \
          exit 1; \
        fi
        @if grep -E '\b[ef]grep\b' $(srcdir)/tests/*.test ; then \
-         echo 'Do not use egrep or fgrep in test cases.  Use $FGREP or $EGREP.' 1>&2; \
+         echo 'Do not use egrep or fgrep in test cases.  Use $$FGREP or $$EGREP.' 1>&2; \
          exit 1; \
        fi
        @if grep -E '\b[ef]grep\b' $(srcdir)/lib/am/*.am $(srcdir)/m4/*.m4; then \
index 28adbc6885782dd9140d789d9b4ade264b7cecc8..6802fc28bead9620bf250acdc09be87a5554d12f 100755 (executable)
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2001, 2002  Free Software Foundation, Inc.
+# Copyright (C) 2001, 2002, 2003  Free Software Foundation, Inc.
 #
 # This file is part of GNU Automake.
 #
@@ -48,7 +48,7 @@ grep AM_PROG_AS stderr
 # On fast machines the autom4te.cache created during the above run of
 # $AUTOMAKE is likely to have the same time stamp as the configure.in
 # created below; thus causing traces for the old configure.in to be
-# used.  We could do `sleep 2', but it's faster to erase the
+# used.  We could do `$sleep', but it's faster to erase the
 # directory.  (Erase autom4te*.cache, not autom4te.cache, because some
 # bogus installations of Autoconf use a versioned cache.)
 rm -rf autom4te*.cache
index f9fdb5591136c32915bde655fd0fe15b49f26cd7..d661c1ee81900ee9376b851de812c4efaeb20075 100755 (executable)
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1996, 1997, 1998, 2000, 2001, 2002
+# Copyright (C) 1996, 1997, 1998, 2000, 2001, 2002, 2003
 # Free Software Foundation, Inc.
 #
 # This file is part of GNU Automake.
@@ -55,7 +55,7 @@ $AUTOCONF || exit 1
 ./configure || exit 1
 $FGREP 'Before.' subdir/config.h
 
-sleep 2
+$sleep
 echo 'After.' > subdir/config.hin
 $MAKE || exit 1
 $FGREP 'After.' subdir/config.h || exit 1
index 35d42d2bb8d308718fabdc22ea2da0f4577da68b..93bc32e14b76ea0cb84d8437c3683d743c506ab0 100644 (file)
@@ -244,6 +244,12 @@ 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 tests call `make -e' but we do not want $srcdir from the evironment
 # to override the definition from the Makefile.
 testsrcdir=$srcdir
index 46e698df3947c67161d8ad7c27878fbad0d25248..20c52810d2a95e3b39ff383702e4d665bb0f209f 100755 (executable)
@@ -63,7 +63,7 @@ test -f am-one.elc
 # Make sure we build all files when any of them change.
 # (We grep a message to make sure the compilation happens.)
 unique=0a3346e2af8a689b85002b53df09142a
-sleep 2
+$sleep
 echo "(message \"$unique\")(provide 'am-three)" > am-three.el
 $MAKE >output 2>&1
 cat output
index 93351b32c4a69c9524706999e5e5e5ea94d991fd..a3fe2653e39a314a230ef2d5c43e49a4501977ea 100755 (executable)
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2002  Free Software Foundation, Inc.
+# Copyright (C) 2002, 2003  Free Software Foundation, Inc.
 #
 # This file is part of GNU Automake.
 #
@@ -62,7 +62,7 @@ test -f main.info
 # This is needed to test the "subtle" issue described below.
 test -f stamp-vti
 test -f version.texi
-sleep 2
+$sleep
 touch stamp-vti
 
 $MAKE distclean
index f222280f6b351fc2ceade0384e3d98adb654df47..d33b801eff65fc6c6864dca8186c902480d94502 100755 (executable)
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2002  Free Software Foundation, Inc.
+# Copyright (C) 2002, 2003  Free Software Foundation, Inc.
 #
 # This file is part of GNU Automake.
 #
@@ -64,7 +64,7 @@ test `wc -l < stderr` = 2
 # On fast machines the autom4te.cache created during the above run of
 # $AUTOMAKE is likely to have the same time stamp as the configure.in
 # created below; thus causing traces for the old configure.in to be
-# used.  We could do `sleep 2', but it's faster to erase the
+# used.  We could do `$sleep', but it's faster to erase the
 # directory.  (Erase autom4te*.cache, not autom4te.cache, because some
 # bogus installations of Autoconf use a versioned cache.)
 rm -rf autom4te*.cache
index be96ac461adc4dbec900d5b4a108b12027c6f34a..75f796f689b22ab16b2d462fc046e2afce2ac362 100755 (executable)
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2001, 2002  Free Software Foundation, Inc.
+# Copyright (C) 2001, 2002, 2003  Free Software Foundation, Inc.
 #
 # This file is part of GNU Automake.
 #
@@ -72,7 +72,7 @@ cd sub
 
 # A delay is needed to make sure that the new parse.y is indeed newer
 # than parse.c, i.e. the they don't have the same timestamp.
-sleep 2
+$sleep
 
 # New parser, with `fubar'
 cat > ../parse.y << 'END'
@@ -94,7 +94,7 @@ grep fubar foo-0.1/parse.c
 
 # A delay is needed to make sure that the new parse.y is indeed newer
 # than parse.c, i.e. the they don't have the same timestamp.
-sleep 2
+$sleep
 
 # New parser, with `maude'
 cat > ../parse.y << 'END'
This page took 0.040513 seconds and 5 git commands to generate.