tests: allow double-colon spy.test to work with HP-UX make.
authorRalf Wildenhues <Ralf.Wildenhues@gmx.de>
Sun, 16 Jan 2011 21:27:37 +0000 (22:27 +0100)
committerRalf Wildenhues <Ralf.Wildenhues@gmx.de>
Mon, 17 Jan 2011 06:47:53 +0000 (07:47 +0100)
* tests/spy.test: Fix comment typos.  Ensure prerequisites we
do not want to depend on are strictly older than the target.
Also test with a target out of date wrt. more than one rule.

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

index 0fe17ab..eda168d 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2011-01-17  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
+
+       tests: allow double-colon spy.test to work with HP-UX make.
+       * tests/spy.test: Fix comment typos.  Ensure prerequisites we
+       do not want to depend on are strictly older than the target.
+       Also test with a target out of date wrt. more than one rule.
+
 2011-01-16  Stefano Lattarini  <stefano.lattarini@gmail.com>
 
        tests: remove useless requirements from cond36.test
index c4993c6..ab68a61 100755 (executable)
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2003  Free Software Foundation, Inc.
+# Copyright (C) 2003, 2011 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
@@ -16,8 +16,8 @@
 
 # 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
+# supported by all Make implementation as far 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).
 
@@ -87,8 +87,18 @@ $sleep
 touch b
 $MAKE
 test "`cat a`" = rule1
+# Ensure a is strictly newer than b, so HP-UX make does not execute rule2.
+$sleep
 : > a
 $sleep
 touch c
 $MAKE
 test "`cat a`" = rule2
+: > a
+$sleep
+touch b c
+$MAKE
+grep rule1 a
+grep rule2 a
+
+: