summaryrefslogtreecommitdiff
path: root/tests/scripts/features/se_explicit
diff options
context:
space:
mode:
Diffstat (limited to 'tests/scripts/features/se_explicit')
-rw-r--r--tests/scripts/features/se_explicit17
1 files changed, 14 insertions, 3 deletions
diff --git a/tests/scripts/features/se_explicit b/tests/scripts/features/se_explicit
index 79e0a36..790017a 100644
--- a/tests/scripts/features/se_explicit
+++ b/tests/scripts/features/se_explicit
@@ -6,6 +6,9 @@ $details = "";
# TEST #0: Test handing of '$' in prerequisites with and without second
# expansion.
+# If we don't support archives then the prerequisite is different
+my $prereq = exists $FEATURES{'archives'} ? '$' : '$(PRE)';
+
run_make_test(q!
ifdef SE
.SECONDEXPANSION:
@@ -18,7 +21,7 @@ PRE = three four
.DEFAULT: ; @echo '$@'
!,
'',
- "\$\nbar\$biz\nfoo\$bar : bar\$baz bar\$biz");
+ "$prereq\nbar\$biz\nfoo\$bar : bar\$baz bar\$biz");
run_make_test(undef, 'SE=1', "three\nfour\nbariz\nfoo\$bar : baraz bariz");
@@ -115,7 +118,7 @@ run_make_test(q!
.SECONDEXPANSION:
all : $$(eval $$(info test))
!,
- '', "test\n#MAKE#: Nothing to be done for `all'.\n");
+ '', "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.
@@ -152,5 +155,13 @@ a%l: q1x $$+ q2x ; @echo '$+'
'', "q1x bar bar q2x bar bar\n");
-# This tells the test driver that the perl test script executed properly.
+# Allow patsubst shorthand in second expansion context.
+# Requires the colon to be quoted. Savannah bug #16545
+run_make_test(q!
+.PHONY: foo.bar
+.SECONDEXPANSION:
+foo: $$(@\\:%=%.bar); @echo '$^'
+!,
+ '', "foo.bar\n");
+
1;