From 281951154bc90849385ae4cacc3cadfc1653b877 Mon Sep 17 00:00:00 2001 From: Paul Smith Date: Wed, 13 Oct 1999 07:00:23 +0000 Subject: * Fix PR/1379: -n/-q behaves correctly when all commands are recursive. --- tests/scripts/options/dash-n | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) (limited to 'tests/scripts') diff --git a/tests/scripts/options/dash-n b/tests/scripts/options/dash-n index c1f4aab..02d7f07 100644 --- a/tests/scripts/options/dash-n +++ b/tests/scripts/options/dash-n @@ -28,4 +28,34 @@ $answer = "echo >> intermediate\necho >> final\n"; unlink('orig', 'intermediate', 'final'); +# TEST2 +# We consider the actual updated timestamp of targets with all +# recursive commands, even with -n. + +$makefile2 = &get_tmpfile; + +open(MAKEFILE, "> $makefile2"); + +print MAKEFILE <<'EOF'; +.SUFFIXES: +BAR = # nothing +FOO = +$(BAR) +a: b; echo > $@ +b: c; $(FOO) +EOF + +close(MAKEFILE); + +&touch('a', 'b'); +sleep(1); +&touch('c'); + +&run_make_with_options($makefile2, "", &get_logfile); +$answer = "$make_name: `a' is up to date.\n"; +&compare_output($answer, &get_logfile(1)); + +&run_make_with_options($makefile2, "-n", &get_logfile); +$answer = "$make_name: `a' is up to date.\n"; +&compare_output($answer, &get_logfile(1)); + 1; -- cgit v1.2.3