summaryrefslogtreecommitdiff
path: root/tests/scripts/options/dash-n
diff options
context:
space:
mode:
authorPaul Smith <psmith@gnu.org>1999-10-13 07:00:23 +0000
committerPaul Smith <psmith@gnu.org>1999-10-13 07:00:23 +0000
commit281951154bc90849385ae4cacc3cadfc1653b877 (patch)
treea78f4d17879b485ea2fa127c21d99ac40a839a00 /tests/scripts/options/dash-n
parent829f4fd04b7fe9e18ed91c236ed46ebce5b27cae (diff)
downloadgunmake-281951154bc90849385ae4cacc3cadfc1653b877.tar.gz
* Fix PR/1379: -n/-q behaves correctly when all commands are recursive.
Diffstat (limited to 'tests/scripts/options/dash-n')
-rw-r--r--tests/scripts/options/dash-n30
1 files changed, 30 insertions, 0 deletions
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;