From: Ralf Wildenhues Date: Sun, 11 Oct 2009 14:58:27 +0000 (+0200) Subject: Fix race condition in werror2.test due to sanity sleep change. X-Git-Tag: v1.12.0b~631 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=aca5bd4d8d3a33d3f6cbb00909a9e099b46d744c;p=platform%2Fupstream%2Fautomake.git 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. Signed-off-by: Ralf Wildenhues --- diff --git a/ChangeLog b/ChangeLog index a00523b..d17f620 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,13 @@ 2009-10-11 Ralf Wildenhues + 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. diff --git a/tests/subdir5.test b/tests/subdir5.test index 1bfee41..2f0113b 100755 --- a/tests/subdir5.test +++ b/tests/subdir5.test @@ -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) diff --git a/tests/subdir8.test b/tests/subdir8.test index 97f7d42..bc3043e 100755 --- a/tests/subdir8.test +++ b/tests/subdir8.test @@ -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' diff --git a/tests/werror2.test b/tests/werror2.test index d55b015..6b6d011 100755 --- a/tests/werror2.test +++ b/tests/werror2.test @@ -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