summaryrefslogtreecommitdiff
path: root/tests/scripts/features/include
diff options
context:
space:
mode:
Diffstat (limited to 'tests/scripts/features/include')
-rw-r--r--tests/scripts/features/include33
1 files changed, 27 insertions, 6 deletions
diff --git a/tests/scripts/features/include b/tests/scripts/features/include
index 60f4482..5f20ad8 100644
--- a/tests/scripts/features/include
+++ b/tests/scripts/features/include
@@ -2,7 +2,8 @@
$description = "Test various forms of the GNU make `include' command.";
-$details = "Test include, -include, sinclude and various regressions involving them.
+$details = "\
+Test include, -include, sinclude and various regressions involving them.
Test extra whitespace at the end of the include, multiple -includes and
sincludes (should not give an error) and make sure that errors are reported
for targets that were also -included.";
@@ -46,16 +47,36 @@ $answer = "There should be no errors for this makefile.\n";
$answer = "This is another included makefile\n";
&compare_output($answer, &get_logfile(1));
+$makefile = undef;
+
# Try to build the "error" target; this will fail since we don't know
# how to create makeit.mk, but we should also get a message (even though
# the -include suppressed it during the makefile read phase, we should
# see one during the makefile run phase).
-# The fix to this caused more problems than the error, so I removed it.
-# pds -- 22 Jan 2000
+run_make_test
+ ('
+-include foo.mk
+error: foo.mk ; @echo $@
+',
+ '',
+ "#MAKE#: *** No rule to make target `foo.mk', needed by `error'. Stop.\n",
+ 512
+ );
+
+# Make sure that target-specific variables don't impact things. This could
+# happen because a file record is created when a target-specific variable is
+# set.
+
+run_make_test
+ ('
+bar.mk: foo := baz
+-include bar.mk
+hello: ; @echo hello
+',
+ '',
+ "hello\n"
+ );
-#&run_make_with_options($makefile, "error", &get_logfile, 512);
-#$answer = "$make_name: *** No rule to make target `makeit.mk', needed by `error'.\n";
-#&compare_output($answer, &get_logfile(1));
1;