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.
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,
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 \
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 \
#! /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.
#
# 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
#! /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.
./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
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
# 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
#! /bin/sh
-# Copyright (C) 2002 Free Software Foundation, Inc.
+# Copyright (C) 2002, 2003 Free Software Foundation, Inc.
#
# This file is part of GNU Automake.
#
# 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
#! /bin/sh
-# Copyright (C) 2002 Free Software Foundation, Inc.
+# Copyright (C) 2002, 2003 Free Software Foundation, Inc.
#
# This file is part of GNU Automake.
#
# 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
#! /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.
#
# 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'
# 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'