test defs: function 'is_newest' now works also with directories
authorStefano Lattarini <stefano.lattarini@gmail.com>
Sat, 23 Jul 2011 11:55:20 +0000 (13:55 +0200)
committerStefano Lattarini <stefano.lattarini@gmail.com>
Sun, 5 Feb 2012 22:10:15 +0000 (23:10 +0100)
Reported by Jim Meyering against automake master (see bug#9147) and
by Adam Sampson against automake 1.11.3 (see bug#10730).

* tests/defs (is_newest): Call 'find' with the '-prune' option,
so that it won't descend in the directories (which could cause
spurious results).
* THANKS: Update.

Backported from commit v1.11-914-gb6a40fa (originally on master).

THANKS
tests/defs.in

diff --git a/THANKS b/THANKS
index fbb7eb4..e6730b4 100644 (file)
--- a/THANKS
+++ b/THANKS
@@ -3,6 +3,7 @@ It would not be what it is today without the invaluable help of these
 people:
 
 Adam J. Richter                adam@yggdrasil.com
+Adam Sampson           ats@offog.org
 Adrian Bunk            bunk@fs.tum.de
 Akim Demaille          akim@freefriends.org
 Alan Modra             amodra@bigpond.net.au
index 31426f2..4990e30 100644 (file)
@@ -486,7 +486,7 @@ old_timestamp=198309271735.59
 # Resolve ties in favor of FILE.
 is_newest ()
 {
-  is_newest_files=`find "$@" -newer "$1"`
+  is_newest_files=`find "$@" -prune -newer "$1"`
   test -z "$is_newest_files"
 }