![]() |
|
We don't bite newbies here... much | |
PerlMonks |
Re^3: [OT] Making GNU make do what I meanby Perlbotics (Bishop) |
on Sep 17, 2022 at 08:58 UTC ( #11146928=note: print w/replies, xml ) | Need Help?? |
... the rule is no longer a simple pattern rule.Right. Since all your targets have no receipt, make tries to find an implicit rule to create the target using a complex Implicit-Rule-Search algorithm.
The filter-rule is not a simple pattern rule, it is an implicit rule.
The prerequisite is computed. Here filter returns the full(!) prerequisite path as a prerequisite of this computed rule as if you have written the explicit rule The %.src within the filter expression is not a pattern in the sense of a simple pattern rule. Here, it is a match against $< when the filter function is executed - something like grep { /\.src$/ } @prerequisites. During the test, $< is the full path (dir + filename) of the initial prerequisite. Running make ; rm foo.obj ; LANG=C make -d shows the whole drama when make starts recursing to find an implicit rule to make some/dir/foo.src which is now treated as a target/dependency of the matching filter expression. But finally make comes to the conclusion that some/dir/foo.src is not a dependency that needs treatment and the filter-receipt is executed:
Update: Run make -p to identify the rule that matched. My test Makefile where the rule is at line #13 returned something like:
In Section
Seekers of Perl Wisdom
|
|