From: Alexandre Duret-Lutz Date: Sun, 7 Apr 2002 21:35:02 +0000 (+0000) Subject: * Makefile.am (maintainer-check): Check for `sleep 1' uses in the X-Git-Tag: branchpoint-1-6~7 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0838a946ff373b90a58147b9d41d619e5518213f;p=thirdparty%2Fautomake.git * Makefile.am (maintainer-check): Check for `sleep 1' uses in the test suite. Suggest `sleep 2' instead. * tests/confsub.test: Use `sleep 2'. --- diff --git a/ChangeLog b/ChangeLog index 25532f6a6..d4b7491ac 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2002-04-07 Alexandre Duret-Lutz + + * Makefile.am (maintainer-check): Check for `sleep 1' uses in the + test suite. Suggest `sleep 2' instead. + * tests/confsub.test: Use `sleep 2'. + 2002-04-04 Paul Eggert * lib/am/subdirs.am: diff --git a/Makefile.am b/Makefile.am index 837cdbc87..239c4ac83 100644 --- a/Makefile.am +++ b/Makefile.am @@ -188,6 +188,13 @@ maintainer-check: automake aclocal echo 'the above lines.' 1>&2; \ exit 1; \ fi +## Never use `sleep 1' to create files with different timestamps. +## Use `sleep 2' instead. Some filesystems (e.g., Windows') have only +## a 2sec resolution. + @if egrep '\bsleep +1\b' $(srcdir)/tests/*.test; then \ + echo 'Do not use "sleep 1" in the above tests. Use "sleep 2" instead.' 1>&2; \ + exit 1; \ + fi # Tag before making distribution. Also, don't make a distribution if diff --git a/Makefile.in b/Makefile.in index dad2fbde1..1696739c3 100644 --- a/Makefile.in +++ b/Makefile.in @@ -256,7 +256,7 @@ maintainer-clean-aminfo: # (which will cause the Makefiles to be regenerated when you run `make'); # (2) otherwise, pass the desired values on the `make' command line. $(RECURSIVE_TARGETS): - @set fnord $(MAKEFLAGS); amf=$$2; \ + @set fnord $$MAKEFLAGS; amf=$$2; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ list='$(SUBDIRS)'; for subdir in $$list; do \ @@ -276,7 +276,7 @@ $(RECURSIVE_TARGETS): mostlyclean-recursive clean-recursive distclean-recursive \ maintainer-clean-recursive: - @set fnord $(MAKEFLAGS); amf=$$2; \ + @set fnord $$MAKEFLAGS; amf=$$2; \ dot_seen=no; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ @@ -371,8 +371,10 @@ distdir: $(DISTFILES) dir=''; \ fi; \ if test -d $$d/$$file; then \ - cp -pR $$d/$$file $(distdir)$$dir \ - || exit 1; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + fi; \ + cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ @@ -689,6 +691,10 @@ maintainer-check: automake aclocal echo 'the above lines.' 1>&2; \ exit 1; \ fi + @if egrep '\bsleep +1\b' $(srcdir)/tests/*.test; then \ + echo 'Do not use "sleep 1" in the above tests. Use "sleep 2" instead.' 1>&2; \ + exit 1; \ + fi # Tag before making distribution. Also, don't make a distribution if # checks fail. Also, make sure the NEWS file is up-to-date. diff --git a/tests/confsub.test b/tests/confsub.test index ed6663b68..3007c2da7 100755 --- a/tests/confsub.test +++ b/tests/confsub.test @@ -36,7 +36,7 @@ $AUTOCONF || exit 1 ./configure || exit 1 fgrep 'Before.' subdir/config.h -sleep 1 +sleep 2 echo 'After.' > subdir/config.hin $MAKE || exit 1 fgrep 'After.' subdir/config.h || exit 1