]> git.ipfire.org Git - thirdparty/automake.git/commitdiff
Fix race condition in werror2.test due to sanity sleep change.
authorRalf Wildenhues <Ralf.Wildenhues@gmx.de>
Sun, 11 Oct 2009 14:58:27 +0000 (16:58 +0200)
committerRalf Wildenhues <Ralf.Wildenhues@gmx.de>
Sun, 11 Oct 2009 14:58:27 +0000 (16:58 +0200)
* tests/werror2.test: Generate Makefile.in before configure so
that a Makefile.am update after configure has run is guaranteed
to be newer than Makefile.in.
* tests/subdir5.test: Document why this test does not need to be
fixed.
* tests/subdir8.test: Likewise.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
ChangeLog
tests/subdir5.test
tests/subdir8.test
tests/werror2.test

index a00523bd1abaf7b0867612c990bd3c0f087e6cee..d17f6200348c9d13656e05005ba2f077e5e37ac2 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,13 @@
 2009-10-11  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
 
+       Fix race condition in werror2.test due to sanity sleep change.
+       * tests/werror2.test: Generate Makefile.in before configure so
+       that a Makefile.am update after configure has run is guaranteed
+       to be newer than Makefile.in.
+       * tests/subdir5.test: Document why this test does not need to be
+       fixed.
+       * tests/subdir8.test: Likewise.
+
        Improve description of the various *LINK variables.
        * doc/automake.texi (Program and Library Variables): _LINK also
        receives libraries to link against.  _LINK may be generated.
index 1bfee41f0b8739c29121b9692cb02bedb65de3f5..2f0113b6f8d61b0a1c57e43eeda1932d70ff06bb 100755 (executable)
@@ -1,5 +1,6 @@
 #! /bin/sh
-# Copyright (C) 2001, 2002, 2003, 2004  Free Software Foundation, Inc.
+# Copyright (C) 2001, 2002, 2003, 2004, 2009  Free Software Foundation,
+# Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -54,6 +55,12 @@ $AUTOMAKE --include-deps --copy --add-missing
 ./configure
 $MAKE
 
+# We shouldn't need to $sleep here: configure ensures that files
+# generated by it are newer than configure.  Thus, even if
+# Makefile.in is newer than configure but the updated Makefile.am
+# below has the same timestamp as Makefile.in, the latter should
+# be rebuilt due to its dependency on configure.in.
+
 # Now add a new directory.
 cat > configure.in << 'END'
 AC_INIT(maude, 1.0)
index 97f7d42367810950f64aad7d659a68a5be19b782..bc3043e097ceb7373d36b4543934647b92f4a32e 100755 (executable)
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2003, 2004  Free Software Foundation, Inc.
+# Copyright (C) 2003, 2004, 2009  Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -67,6 +67,7 @@ $AUTOMAKE --copy --add-missing
 $MAKE
 
 # Now add a new directory.
+# See subdir5.test for why we shouldn't need to $sleep here.
 
 mkdir sub/maude
 cat > sub/maude/Makefile.am << 'END'
index d55b0159d98042f454938da076ac2c877953aedb..6b6d011a74e9c5ce316a8746706f6c84e228c181 100755 (executable)
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2004  Free Software Foundation, Inc.
+# Copyright (C) 2004, 2009  Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -29,8 +29,11 @@ echo AC_OUTPUT>>configure.in
 : > Makefile.am
 
 $ACLOCAL
-$AUTOCONF
+# Create Makefile.in before configure.  configure ensures files
+# generated by it or later are newer than configure, so this allows
+# us to avoid a $sleep before updating Makefile.am below.
 $AUTOMAKE
+$AUTOCONF
 
 ./configure
 $MAKE