From 599a8f5ef7241b23ed96b18f32f745d028d26c11 Mon Sep 17 00:00:00 2001 From: Ralf Wildenhues Date: Sun, 16 Jan 2011 22:27:37 +0100 Subject: [PATCH] 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. Signed-off-by: Ralf Wildenhues --- ChangeLog | 7 +++++++ tests/spy.test | 16 +++++++++++++--- 2 files changed, 20 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 0fe17ab..eda168d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2011-01-17 Ralf Wildenhues + + 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 tests: remove useless requirements from cond36.test diff --git a/tests/spy.test b/tests/spy.test index c4993c6..ab68a61 100755 --- a/tests/spy.test +++ b/tests/spy.test @@ -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 + +: -- 2.7.4