]> git.ipfire.org Git - thirdparty/automake.git/commitdiff
* tests/spy.test: New file.
authorAlexandre Duret-Lutz <adl@gnu.org>
Mon, 10 Nov 2003 21:49:21 +0000 (21:49 +0000)
committerAlexandre Duret-Lutz <adl@gnu.org>
Mon, 10 Nov 2003 21:49:21 +0000 (21:49 +0000)
* tests/Makefile.am (TESTS): Add spy.test.

ChangeLog
tests/Makefile.am
tests/Makefile.in
tests/spy.test [new file with mode: 0755]

index 77df86bb84bb325c0f02acca6937a8195aa2396a..8b05edff9a4cfbcce3aaca43c087d913dcabb644 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
 2003-11-10  Alexandre Duret-Lutz  <adl@gnu.org>
 
+       * tests/spy.test: New file.
+       * tests/Makefile.am (TESTS): Add spy.test.
+
        * automake.in (handle_configure): Distribute and define mkinstalldirs
        only if it is already present in the package.
        (scan_autoconf_files): Do not require mkinstalldirs.
index afb9ed22b9da26260240e2a42374a2a57461bfe2..66520ed82d0687ea31f64a6d7be8e678d666dad6 100644 (file)
@@ -409,6 +409,7 @@ spell.test \
 spell2.test \
 spell3.test \
 spelling.test \
+spy.test \
 stamph2.test \
 stdlib.test \
 stdlib2.test \
index a3532d8422a13f60f28db0f8350d1b7366f2b812..139579095533a13ca82db241a0b0e48a683767a2 100644 (file)
@@ -523,6 +523,7 @@ spell.test \
 spell2.test \
 spell3.test \
 spelling.test \
+spy.test \
 stamph2.test \
 stdlib.test \
 stdlib2.test \
diff --git a/tests/spy.test b/tests/spy.test
new file mode 100755 (executable)
index 0000000..b09a33f
--- /dev/null
@@ -0,0 +1,84 @@
+#! /bin/sh
+# Copyright (C) 2003  Free Software Foundation, Inc.
+#
+# This file is part of GNU Automake.
+#
+# GNU Automake 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.
+#
+# GNU Automake 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 autoconf; see the file COPYING.  If not, write to
+# the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+# Boston, MA 02111-1307, USA.
+
+# Check whether double colon rules work.  The Unix V7 make manual
+# mentions double-colon rules, but POSIX does not.  They seem to be
+# supported by all Make implementation as we can tell. This test case
+# is a spy: we want to detect if there exist implementations where
+# these do not work.  We might use these rules to simplify the rebuild
+# rules (instead of the $? hack).
+
+. ./defs || exit 1
+
+set -e
+
+cat >Makefile <<\EOF
+a :: b
+       echo rule1 >> $@
+a :: c
+       echo rule2 >> $@
+a :: b c
+       echo rule3 >> $@
+EOF
+
+touch b c
+$MAKE
+test "`cat a`" = rule1
+: > a
+$sleep
+touch b
+$MAKE
+test "`cat a`" = rule1
+: > a
+$sleep
+touch c
+$MAKE
+test "`cat a`" = rule2
+: > a
+$sleep
+touch b c
+$MAKE
+test "`cat a`" = rule1
+
+
+: > a
+$sleep
+cat >Makefile <<\EOF
+a :: b c
+       echo rule1 >> $@
+a :: c
+       echo rule2 >> $@
+a :: b
+       echo rule3 >> $@
+EOF
+
+touch b
+$MAKE
+test "`cat a`" = rule1
+: > a
+$sleep
+touch c
+$MAKE
+test "`cat a`" = rule1
+: > a
+$sleep
+touch b c
+$MAKE
+test "`cat a`" = rule1