summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorPaul Smith <psmith@gnu.org>2009-06-07 18:16:15 +0000
committerPaul Smith <psmith@gnu.org>2009-06-07 18:16:15 +0000
commita72bff7cb3090051e75b631694aeb2bdb863aeb5 (patch)
tree2dfbdf8b207ac47133349e65fe713fc32e68ec58 /tests
parent0b30c8d9cef18f55e2425e32ffc1552af650a1be (diff)
downloadgunmake-a72bff7cb3090051e75b631694aeb2bdb863aeb5.tar.gz
- Fix Savannah bug #24622
Diffstat (limited to 'tests')
-rw-r--r--tests/ChangeLog3
-rw-r--r--tests/scripts/features/se_explicit24
2 files changed, 15 insertions, 12 deletions
diff --git a/tests/ChangeLog b/tests/ChangeLog
index 062e619..244af41 100644
--- a/tests/ChangeLog
+++ b/tests/ChangeLog
@@ -1,5 +1,8 @@
2009-06-07 Paul Smith <psmith@gnu.org>
+ * scripts/features/se_explicit: Make sure we catch defining
+ prereqs during snap_deps(). Savannah bug #24622.
+
* scripts/variables/automatic: Check prereq ordering when the
target with the recipe has no prereqs. Savannah bug #21198.
diff --git a/tests/scripts/features/se_explicit b/tests/scripts/features/se_explicit
index b0342c7..454d494 100644
--- a/tests/scripts/features/se_explicit
+++ b/tests/scripts/features/se_explicit
@@ -86,31 +86,19 @@ run_make_test('
all: foo bar baz
# Subtest #1
-#
foo: foo.1; @:
-
foo: foo.2
-
foo: foo.3
-
# Subtest #2
-#
bar: bar.2
-
bar: bar.1; @:
-
bar: bar.3
-
# Subtest #3
-#
baz: baz.1
-
baz: baz.2
-
baz: ; @:
-
',
'',
'foo.1
@@ -129,6 +117,18 @@ run_make_test('
all : $$(eval $$(info test))
', '', "test\n#MAKE#: Nothing to be done for `all'.\n");
+# TEST #5: (NEGATIVE) catch eval in a prereq list trying to create new
+# target/prereq relationships.
+
+run_make_test('
+.SECONDEXPANSION:
+proj1.exe : proj1.o $$(eval $$(test))
+define test
+proj1.o : proj1.c
+proj1.c: proj1.h
+endef
+',
+ '', "#MAKE#: *** prerequisites cannot be defined in recipes. Stop.\n", 512);
# This tells the test driver that the perl test script executed properly.
1;