summaryrefslogtreecommitdiff
path: root/tests/scripts/options/dash-B
diff options
context:
space:
mode:
authorPaul Smith <psmith@gnu.org>2002-08-08 00:11:19 +0000
committerPaul Smith <psmith@gnu.org>2002-08-08 00:11:19 +0000
commitf2ceb0d68aa780e57641e50d972fac3b6e70bd58 (patch)
tree73853f27fe9a08b2ba2938057f1f3ccc51597d06 /tests/scripts/options/dash-B
parentbccb277dda1a4dcc6729824a7c9d544086f147c3 (diff)
downloadgunmake-f2ceb0d68aa780e57641e50d972fac3b6e70bd58.tar.gz
Incorporate some VMS fixes.
Add -B option docs. Add .VARIABLES variable. Add a few new tests. Add a new translation: Swedish
Diffstat (limited to 'tests/scripts/options/dash-B')
-rw-r--r--tests/scripts/options/dash-B43
1 files changed, 43 insertions, 0 deletions
diff --git a/tests/scripts/options/dash-B b/tests/scripts/options/dash-B
new file mode 100644
index 0000000..94932e5
--- /dev/null
+++ b/tests/scripts/options/dash-B
@@ -0,0 +1,43 @@
+# -*-perl-*-
+
+$description = "Test make -B (always remake) option.\n";
+
+$details = "\
+Construct a simple makefile that builds a target.
+Invoke make once, so it builds everything. Invoke it again and verify
+that nothing is built. Then invoke it with -B and verify that everything
+is built again.";
+
+open(MAKEFILE,"> $makefile");
+
+print MAKEFILE <<'EOF';
+.SUFFIXES:
+
+.PHONY: all
+all: foo
+
+foo: bar.x
+ @echo cp $< $@
+ @touch $@
+EOF
+
+close(MAKEFILE);
+
+
+&touch('bar.x');
+
+&run_make_with_options($makefile, '', &get_logfile);
+$answer = "cp bar.x foo\n";
+&compare_output($answer, &get_logfile(1));
+
+&run_make_with_options($makefile, '', &get_logfile);
+$answer = "$make_name: Nothing to be done for `all'.\n";
+&compare_output($answer, &get_logfile(1));
+
+&run_make_with_options($makefile, '-B', &get_logfile);
+$answer = "cp bar.x foo\n";
+&compare_output($answer, &get_logfile(1));
+
+unlink('bar.x', 'foo') unless $keep;
+
+1;