mirror of
https://github.com/mirror/make.git
synced 2026-09-03 13:13:01 +08:00
Improve handling for escaped colons in prerequisite lists.
Fixes Savannah bug #12126 and bug #16545
This commit is contained in:
@@ -54,5 +54,13 @@ run_make_test(undef,
|
||||
'sharp',
|
||||
'foo#bar.ext = (foo#bar.ext)');
|
||||
|
||||
# Test escaped colons in prerequisites
|
||||
# Quoting of backslashes in q!! is kind of messy.
|
||||
run_make_test(q!
|
||||
foo: foo\\:bar foo\\\\\\:bar foo\\\\\\\\\\:bar
|
||||
foo foo\\:bar foo\\\\\\:bar foo\\\\\\\\\\:bar: ; @echo '$@'
|
||||
!,
|
||||
'', "foo:bar\nfoo\\:bar\nfoo\\\\:bar\nfoo\n");
|
||||
|
||||
# This tells the test driver that the perl test script executed properly.
|
||||
1;
|
||||
|
||||
@@ -152,5 +152,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;
|
||||
|
||||
Reference in New Issue
Block a user