mirror of
https://github.com/mirror/make.git
synced 2026-08-30 19:27:57 +08:00
[SV 54161] Fix second expansion of $* for paths
If the stem matches a path containing a directory not just a filename, make sure the second expansion of $* in the prerequisites matches $* in the recipe. This requires using $(*F) when replacing % in the first expansion to preserve the simple filename. * src/implicit.c (pattern_search): If lastslash is set prepend the directory onto the stem. Then use $(*F) when expanding %. * tests/scripts/features/se_implicit: Add a test case
This commit is contained in:
committed by
Paul Smith
parent
c72205b28b
commit
86f2f8bcb5
@@ -254,5 +254,13 @@ foo: $$(info $$<)
|
||||
!,
|
||||
'', "bar\n#MAKE#: Nothing to be done for 'foo'.\n");
|
||||
|
||||
# SV 54161: Expand $$* properly when it contains a path
|
||||
|
||||
run_make_test(q!
|
||||
.SECONDEXPANSION:
|
||||
%x: $$(info $$*); @echo '$*'
|
||||
!,
|
||||
'q/ux', "q/u\nq/u\n");
|
||||
|
||||
# This tells the test driver that the perl test script executed properly.
|
||||
1;
|
||||
|
||||
Reference in New Issue
Block a user