AM_TAP_LOG_DRIVER_FLAGS = --merge
-EXTRA_DIST += t/README t/ax/is
+EXTRA_DIST += t/README t/ax/is t/ax/is_newest
TESTS = ## Will be updated later.
--- /dev/null
+#! /bin/sh
+# Copyright (C) 2012 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
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Usage: is_newest FILE FILES
+# Fail if any file in FILES is newer than FILE, and print the list of
+# such files on the standard error.
+# Resolve ties in favor of FILE.
+
+set -u
+
+me=is_newest
+
+if test $# -lt 2; then
+ echo "$me: too few arguments" >&2
+ exit 2
+fi
+
+file=$1; shift
+newer_files=$(find "$@" -prune -newer "$file") || exit $?
+
+if test -n "$newer_files"; then
+ echo "$me: these files are newer than '$file':" >&2
+ for f in $newer_files; do echo "* $f" >&2; done
+ exit 1
+fi
+
+exit 0
test x"$host_alias" != x && test x"$build_alias" != x"$host_alias"
}
-# is_newest FILE FILES
-# --------------------
-# Return false if any file in FILES is newer than FILE.
-# Resolve ties in favor of FILE.
-is_newest ()
-{
- is_newest_files=$(find "$@" -prune -newer "$1")
- test -z "$is_newest_files"
-}
-
# is_blocked_signal SIGNAL-NUMBER
# --------------------------------
# Return success if the given signal number is blocked in the shell,